Hi everyone!
Can you help me to get a particular axis coordinate for my object please? My only result is that the Movement script now dumps the current coordinates to the console.
My idea is to turn off the rocket’s thrusting as it reaches certain height. For that, I am going to compare its current y axis position to the variable I’ve declared and put in serizalizefield earlier. Should be something like
[SerializeField] float maxHeight = 30f;
...
void Update()
{
ProcessThrust();
ProcessRotation();
if (??? > maxHeight)
// The ??? stands here for the current Y axis position.
{
Debug.Log("You raised too high");
}
}