[Solved]getXVelocity() not found


I try to get a object’s x axis speed , but it throw an function it is not a function , but the function of object shown in auto-complete

I use TopDownMovement behavior
I tried three function

getAngle() [it works]
getMovementAngleOffset() [is not a function]
getXVelocity() [is not a function]

It shows up in autocomplete because you tell it it is a TopDownMovementRuntimeBehavior when it is not. Since it is not one obviously it will crash. If you want to interact with the object use object.getBehavior(theBehaviorName) first.

Oh it works , thanks.
but why .getBehavior is not shown in autocomplete?