- Home /
default cylinder to indicate hit.normal
How do you align a default unity cylinder to indicate the hit.normal vector in a raycast?
Comment
Best Answer
Answer by loopyllama · May 05, 2011 at 08:36 AM
I haven't tested, but wouldn't this work?
cylinder.transform.rotation = Quaternion.FromToRotation (Vector3.up, RaycastHit.normal);
nvm it worked! (child object, the arrow had been set at 90 degree off, in trying to get a previous hack to work)