DEV Community

Discussion on: Unity Transform: Position

Collapse
 
kodikos profile image
Jodi Winters

I'm worried that you are mixing two different movement systems, that could lead to weird behaviour. If you notice, you are using the transform to change the X and Z position, but using the rigidbody to do the jump on the Y-axis. Transform is literally setting the position of the cube in 3D space. But rigidbody is a part of the physics engine and you are applying a force and asking it to calculate it's position. It's usually best to stick to one or the other. Doing it all with position is not particularly arduous, most flappy bird implementations will do it.

Collapse
 
elliezub profile image
Ellie

Hi Jodi!! Thanks for the feedback, I didn't know that mixing the two was typically not a good idea, I'll try and update the article to stick to one or the other 😄