Skip navigation

Category Archives: Rigidbody

Thought this was going to be an unproductive lunch but I managed to find an easy way to lock the Z position and stop the cube from rotating about. You can also lock the rotation in each axis which solves the problem of the cube falling over:

Setting Constraints

I also found an amended version of the  example of the Unity 2DGameplayTutorialProject Lerpz project here:

This strips out all the fluff and is just the useful movement bits. I’m going to try and learn from this to help me add jumping to my game, as if you just lift an entire script you never understand fully how it works, which will come back to bite you later on when you come to add more features or need to fix bugs with it.

Another useful thing from this example is that it showed me what type of shader I need to add to utilise the transparency on my character PNG:

Transparency Shader

It also uses a plane instead of a cube for the character, which probably makes sense for me so I’ll switch this out later.