- Home /
Question by
SloppyStudios · Mar 03 at 10:47 AM ·
rotation
Quaternion.FromToRotation Issue with Hit.normal
I am spawning these 2 tyers on either side of the cube using Raycast hit.
.
tyer.rotation = Quaternion.FromToRotation(Vector3.up, hit.normal);
But as you can see both the tyers have a different spin directions which is Positive Y axis in the Hinge Joint.
.
I want them to spin in same direction when attached in opposite sides.
If i use tyer.rotation = Quaternion.LookRotation(hit.normal);
it works fine but on a different tyer where Z axis is pointing outwards.
How can I make it work with this tyer where Y axis is point outwards ?
tyre-issue.jpg
(49.9 kB)
Comment
Your answer
Follow this Question
Related Questions
Flip over an object (smooth transition) 3 Answers
Touch mouseorbit 5 Answers
Pinball Flipper using Quaternion.Lerp? 1 Answer
Rotation of object/model without effecting direction C# 2 Answers
Rotating a Prefab? 3 Answers