_walker.linearVelocity = new Vector3D(0,0,0.1)  doesn`t work

Software: Away3D 4.x

datouaizi, Member
Posted: 11 February 2012 10:28 AM   Total Posts: 98

_walker.linearVelocity = new Vector3D(0,0,0.1);

_walker doesn`t` move,why?

when i use _walker.x += 1, it moves.

   

John Brookes, Moderator
Posted: 11 February 2012 01:20 PM   Total Posts: 732   [ # 1 ]

Depends where your setting it.
It will be cleared every time you step through the physics, so if its not in your enter frame then maybe thats it.

If its in your enterframe and its not moving then its probably falling asleep.
you can set a higher sleeping threshold
eg
body.linearSleepingThreshold = some value

or set it to active when you need to move
body.activate(true);

or set it to not fall asleep
body.activationState = AWPCollisionObject.DISABLE_DEACTIVATION;

Look in the examples for the physics debug. The colour of the bounds will tell you if your body is asleep active etc.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X