Hello i’m trying to make the player move with keys, i tried both applyForce (not desired accel system) and applyImpulse (ok for the movement accel) but when i release the key the player keep on shifting on the ground. How can i avoid that?
Link to project: https://playcanvas.com/editor/scene/384873
This tutorial might be helpful http://developer.playcanvas.com/en/tutorials/first-person-movement/ . It’s for a first person controller but the movement principles should be the same.
Tried that but the player keep skidding foward when i release the key sigh
You need to apply linear damping on the player physics as seen in the FPS example that vaios linked to:
-_-; didn’t noticed that…too focused on code…thanks @yaustar
Ehm since the rotation in that example is tied to mouse movement how can achieve that using A/D keys to rotate the player? tired this but no success this.entity.setEulerAngles(0,this.entity.getEulerAngles.y-1,0);
ops this.entity.getEulerAngles().y it works but when i press the W key it goes back to the initial position
found out just missed this.entity.rigidbody.syncEntityToBody();