Reference the velocity direction of an active actor?

Hi all,
I'm looking to change the velocity of an actor while it is active. Every time a timer gets reset, I want another actor to increase its speed.

The only way I've been able to do this is by using the Change Velocity behavior. (If there's another way, please let me know)

The problem is that when I spawned this particular actor, the directional part of its velocity is set to random(0,360).
I want to maintain this direction when I increase its speed later...so what do I put in the 'direction' input in the Change Velocity behavior that will allow me to MAINTAIN this random direction, while simply increasing its speed?

Thanks for any help you can offer!

Comments

  • AdrenalineAdrenaline Member Posts: 523
    I solved it. For anyone wondering, here's how you adjust the speed on an active actor, without changing its random direction from when it spawned:

    Use a Change Velocity behavior.

    Direction:
    vectorToAngle( self.Motion.Linear Velocity.X , self.Motion.Linear Velocity.Y )

    Speed:
    [put your new speed here]
Sign In or Register to comment.