I have recently picked up game development again as a hobby and am a bit confused when it comes to the scales in Unity. I am trying to make a script that checks if the player is grounded. I want the player to be 2 meters tall. I use a scale of 2 on the Y axis for this. See the image called playerScript.png .
in the inspector i have set the playerheight to 2 aswell to make it the same. I use the code below for my check.
BTW - the scale of an object’s transform is just a multiplier and doesn’t actually represent the size of an object. An object could have a transform scale of 1,1,1 and yet be 100 meters tall. It all depends on the scale of the mesh when imported.
To get the actual world height of the object you can do this:
I am learning to make a basic fps character yes. For now i am only making 1 that can do basics like walking, jumping and sprinting.I will have a look at it as i love reading up on new things.