G
G
greedile2021-12-13 18:55:46
Unity
greedile, 2021-12-13 18:55:46

Why does transform.translate bounce when touching a collider?

In 1st person controller I use transform.translate to move but when I touch the wall the player starts bouncing, if I use move position or velocity / addforce the player doesn't move when kinematic is on but when is kinematic off it falls under earth. How can I use translate without this error or addforce/velocity without kinematics?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
KraGen.Developer, 2021-12-14
@greedile

Add a collider to the player and to the stage,

F
freeExec, 2021-12-13
@freeExec

No way, either you move as you want and are responsible for the position of the object yourself, or physics does it and hits you on the hands for passing through the walls.

E
Ente, 2021-12-14
@Ente

All movement of objects that are affected by Unity physics must be done in FixedUpdate, in other Updates they will twitch and shake.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question