1
My object moves by the keys A,D,W,S. It moves 1 in 1. However, this position is not always round, and can vary from 1.5 to 1.900 and this hinders the collision. Is there a command to round positions?
1
My object moves by the keys A,D,W,S. It moves 1 in 1. However, this position is not always round, and can vary from 1.5 to 1.900 and this hinders the collision. Is there a command to round positions?
Browser other questions tagged unity-5
You are not signed in. Login or sign up in order to post.
Yes, there is the
Mathf.Round. I didn’t answer because I don’t know if this solves your problem, because the question is not totally clear (what is a "position"? is a value of aVector3that you use to do the translation? Why does it hinder the collision? The collision is manually made by you, or is Unity doing it? etc).– Luiz Vieira