it’s been said not to modify x,y,z, or w
values of quaternion if we don’t know how it works.
(Unity - Scripting API: Quaternion)
So is there a way to work around it like:
modify Vector3’s (x, y, z) values, and then translate it to quaternion? (vector4, I believe)
So the question is like: is there a way to assign vector3 values to quaternion (vector4 ?) - if I got the problem correctly.
Has anybody done that before? Thanks in advance.
Just use transform.eulerAngles, which takes a Vector3.
–Eric
I think you might want Quaternion.LookRotation.
Damn, whether I don’t know how to use your advise or it’s not the right one ;p.
I need to modify targetRotation in configurable joint, via input. but I can’t modify it’s values, using mouse X or Y axis, just like that, cause it gives crazy results sometimes.
Damn, it’s sad cause to learn to modify quaternion values would be probably the last thing that I need to finish what I’ve got ;|…
Okay, in that case, try something like “targetRotation = Quaternion.Euler(myVector3ValueHere)”.
–Eric
Oh thanks. I’m getting on it right away ;)…