What is the right way to make your player move using the Rigidbody? I’ve seen tons of people suggest to use the Rigidbody instead of transform.position (wich is what i came up with).
I’ve made this little script, wich obiviously isn’t right.
void Update()
{
if (Input.GetButtonDown(‘jump’))
{
rb.MovePosition(transform.position + transform.up * jump * Time.deltaTime);
}
if (Input.GetKey(KeyCode.RightArrow))
{
rb.MovePosition(transform.position + transform.forward * speed * Time.deltaTime);
}
Do i need to make use of ‘force’? Right now, the jumping mechanic seems to actually work, however, i’m unable to move and the collision detection is all over the place. Do i have to edit my ‘platforms’ in order to respond properly to the rigidbody? When i used the transform.position method, the collision detecting seemed to work. I’m trying to go with that old school mario feel. So i want the movement to feel responsive and challenging.
Thanks alot! ![]()