How do I get unit velocity?

  • October 3, 2018 at 15:49 #23897

    Not the float desired speed but it’s Vector3 velocity?

    October 4, 2018 at 02:19 #23899

    If you implement the interface IMoveUnits in a script you will get a function called Move( Vector3 velocity, float deltaTime ), as well as Rotate( Vector3 targetOrientation, float angularSpeed, float deltaTime ), but using this interface means you now have to move your unit with your own code:

    • This reply was modified 2 months, 1 week ago by EatMyTime.
    October 4, 2018 at 10:52 #23903

    The UnitFacade fronts most things unit related, which includes the velocity (the steering force being applied) and the actual velocity (the velocity by which the unit is actually moving). The latter may be different than the formaer if e.g. the unit is stuck running into a wall.

You must be logged in to reply to this topic.