Keep an enemy facing target

Steen Petersen

New member
Hi,

I'm unsure how to properly go about this as this is my first few days using this asset, but I am using rootmotion on my enemies and I can get them to move very well and all but I get stuck in a sequence of my tree because in order to get the enemy to keep facing the player, I set a repeater to forever on the rotate towards.

tree_eg.png

This means that the parallel event never ends and I get stuck in it. Im sure there is a simple way to get this done and I could most likely fix it with code, but Im trying to understand the correct way to go about this using the tree only.

thank you in advance, I will update this if I find a solution tomorrow morning.

regards and thank you for a great asset.
 
Rotate Towards will directly set the rotation so as long as nothing is overriding that rotation it'll rotate. You mentioned that you are using root motion - are you also using a character controller? If you are chances are that the value is being overridden.
 
It does rotate, but only once, I need it to keep rotating if say, the character moves position while it is pursuing. Is rotate towards supposed to keep rotating in the situation above if I had no repeater?
 
Top