I'm trying to move NPC character few steps backward while still facing player. Is it possible in AC?
SetMoveDirectionAsBackward doesn't seem to work or I'm doing something wrong because my NPC is always turning to face direction towards he moves.
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
What's the context? Is this for a 2D/3D game, and is it only during a specific moment?
In 2D, you can use the Character: Change rendering Action to temporarily force the character to face a given direction.
In script, SetMoveDirectionAsBackward would need to be called each frame, but you may have luck just setting their turnSpeed to zero.
It's a 3D game, it's only during specific moment.
When I set turnSpeed to zero, character moves forward but never reaches destination, because destination is in the back.
When I call SetMoveDirectionAsBackward every frame - character speed float in animator goes beyond zero but he still turn toward direction and move like normal.
Here's the code:
This does it:
Thank you, I had to modify it slightly for my needs but this approach works fine. Although speed parameter in animator is still >0 but it's easy to make some workaround.