I have a simple if statement as follows:
if (!state.wasGroundedLastFrame && _speed.y > 0){
_newPosition.y += _speed.y * Time.deltaTime;
}
But as you can see in the image below that it’s entering the block even when _speed.y
is less than 0. What could I be doing wrong?
I using MonoDevelop with Unity in C#
Aucun commentaire:
Enregistrer un commentaire