It's 4 years old
Storing a rotation variable, does it store the value of rotation or does it update whenever the object rotates?
This is a very simple question that I need the answer to, please. If I update a variable like: OriginalRotation = player.transform.eulerangles.x Ignore the fact I haven't used capitals where I should. If I rotate the transform but don't update this variable, manually, will the value stay as the same number or will it update with the rotation? If it updates with the rotation can you please suggest a way in which I can make the variable keep the same value until I want it to manually update? Thanks in advance. By the way my code is in C#
Good day.
This is not following UA rules, you nned to test your things before co$$anonymous$$g here to ask. And after trying and experimenting, if still need help, come to ask, and we will help you with no problem
Answer by Graham-Dunnett · Jun 07, 2014 at 10:24 AM
You've obviously posted your question without doing any experiments. I think it'll take you 30 seconds to work out that the variable is a copy of what was in the rotation, and if the rotation changes the variable doesn't.
Hi Graham, you seem to be very knowledgable, I have a question that I have not been able to figure out on my own, mostly because I am very new to C+ and Unity3d... Not sure if there is an easy answer or maybe you can just point me in the right direction, but if you can take a look at my question here I will highly appreciate it:
https://answers.unity.com/questions/1512173/sliders-tilt-and-yaw-rotation-1.html
Sorry I asked the question here, but I wasn't sure how to send you a P$$anonymous$$..
Thank you in advance!
Fabio