- Home /
Rotating an Object to normal
Hi all,
I'm having trouble getting an object to rotate to be normal to whatever surface its on. I have to separate issues. First I cast a raycast and use hit.normal to get the normal of a sphere but I cant get a cube to instantiate rotated towards that normal. The second is then how to get it to snap towards the surface. I figured I could get hit.position as the instantiation point but that is causing troubles for me. So any help would be appreciated. I've been trying it in both JavaScript and C# and having a lot more problems than I thought I would. Thanks in advance!
how would i send the information to the object? Right now I'm just doing instantiate( object, position, and this is where I want the normal rotation).
Your answer
Follow this Question
Related Questions
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Instantiate ground/enemies 1 Answer
instantiating vertically 2 Answers
GUIText Instantiation and Update the Instantiated Text. C# 1 Answer