Hi all, I've been trying to make a movement script with real physics with bad results and I wonder if someone made something similar. My main problem is that I don't understand how to configure it to make my character inmune to X and Z rotations, be able to jump and not have a really slippery floor. When I solve one of the problems I get another one...
Did any of you manage to do something realistic? Using physics I mean.
The first person movement tutorial deals with a lot of these problems: http://developer.playcanvas.com/en/tutorials/first-person-movement/
Yep but still not jumping
I forgot to say that I try to set real size and mass in my character
There are several ways to go about this.
Sounds logical, I will try that. Thanks for the help!
Actually, this should stop any movement right?
Because it is not stopping anything :S And I am calling that from the rigid object I am moving.
linearVelocity is a property so you will need to do something like this unfortunately:
var linearVelocity = this.entity.rigidbody.linearVelocity;
linearVelocity.set(0, 0, 0);
this.entity.rigidbody.linearVelocity = linearVelocity;
This post was flagged by the community and is temporarily hidden.