Page 1 of 1

Forcing an actor to "face" another via ACS?

Posted: Sun Mar 18, 2018 12:18 am
by Ravick
Hi there,

I'd like to make an actor "face" anotehr one(s) via ACS. I mean, It'd be just like DECORATE's "A_FaceTarget", but not restricted to actor's target; I'd like to force an actor to face any TID'ed actor as I wish. How could I do that?

Thanks in advance! :)

Re: Forcing an actor to "face" another via ACS?

Posted: Sun Mar 18, 2018 4:18 am
by krokots
You can use SetActorAngle.
First, calculate the angle between actor A and B from positions. I think it is atan2(B.Y - A.Y , B.X - A.X). Convert that to fixed angle (check Definitions.

Re: Forcing an actor to "face" another via ACS?

Posted: Mon Mar 19, 2018 9:03 pm
by Ravick
Thank you again, Krokots! :D