#how do i make rotations not slippery

1 messages · Page 1 of 1 (latest)

balmy galleon
#

Create > 2D > Physics Material 2D

and then change the friction to a higher number

cerulean thorn
#

still doesnt do anything

#

this is the rotation script if that helps

#
        float verInput = SimpleInput.GetAxisRaw("Vertical");

        Vector2 movedir = new Vector2(horInput, verInput);
        float inputmagnitude = Mathf.Clamp01(movedir.magnitude);
        movedir.Normalize();

        if (movedir != Vector2.zero)
        {
            Quaternion toRotation = Quaternion.LookRotation(Vector3.forward, movedir);
            playerTrans.transform.rotation = Quaternion.RotateTowards(transform.rotation, toRotation, spinspeed * Time.deltaTime);
        }```
balmy galleon
#

So you dont want it to be able to rotate in the air is that correct?

cerulean thorn
#

no i mean when its on the ground and it rotates it doesnt act like u think it should it just rotates

balmy galleon
#

could you send the entire code because im getting errors everywhere

cerulean thorn
#

i dont think it has anything to do with the code

#

wait ill record another vid to explain better

cerulean thorn
cerulean thorn
#

it doesnt have anything to do with the pogo script itself so i removed it to explain better

hexed burrow
#

What is it that you want it to do, to me it looks like its working fine?