How can I set rotation properly?
I've been searching for hours and hours and trying everything I can figure out and everything I can find. I'm trying to make a save/load system that allows me to store objects placed by the player. I have everything down except getting the rotation correct and it's really screwing up a lot of other things as well. I cannot figure out how to be able to store rotation values, then restore them to the object. I can easily store the rotation as 3 floats, as I do with position. With position I simply set x y and z to the saved floats for x y and z. For rotation, it seems no matter what I do there's always something incredibly weird going on where it's offset by seemingly random amounts. Is there any way I can directly set X, Y, and Z values like with position?
I have tried transform.Rotation(x, y, z, space.self/world) I have tried Quaternion.Euler(x, y, z) I have tried Quaternion.EulerAngles(x, y, z) I've tried converting between angles and radians I've tried multiplying by its rotation I've tried multiplying by parent rotations. Nothing works and I don't understand any of it.
Can someone please help me figure this out?
Your answer
Follow this Question
Related Questions
How to rotate a camera slowly along a tween? 1 Answer
Weird rotation when using Slerp!!? 3 Answers
How to set a max rotation angle 1 Answer
Rotating Vector3, linecast 1 Answer