These forums are CLOSED. Please visit the new forums HERE
using a vector to specify llSetRot? |
|
Senuka Harbinger
A-Life, one bit at a time
![]() Join date: 24 Oct 2005
Posts: 491
|
11-14-2005 19:18
is there a script that will convert a vector (non unit prefferably), into a quaternion for the llSetRot command?
|
Seifert Surface
Mathematician
![]() Join date: 14 Jun 2005
Posts: 912
|
11-14-2005 19:52
I'm not exactly sure what you mean.
If you mean you want a rotation around your vector by some angle, then you want to look at llAxisAngle2Rot. If you want to get a rotation that points the front of something at your vector, and you don't care about the "roll" angle, then you want to do something like llRotBetween(<0,0,1>, yourvec). _____________________
-Seifert Surface
2G!tGLf 2nLt9cG |
Jillian Callahan
Rotary-winged Neko Girl
![]() Join date: 24 Jun 2004
Posts: 3,766
|
11-14-2005 20:11
_____________________
|
Dyne Talamasca
Noneuclidean Love Polygon
![]() Join date: 9 Oct 2005
Posts: 436
|
11-15-2005 00:14
If it's the euler thing, don't forget to convert the angle into radians first.
The wiki page on Rotations shows you the exact code to do what you ask. _____________________
|
Ben Bacon
Registered User
Join date: 14 Jul 2005
Posts: 809
|
11-15-2005 03:52
Senuka, if the vector represents rotation around the x, y and z axes, then use llEuler2Rot as mentioned by Jill - but I get the feeling (from your mention of non-unit vectors) that it is an offset from one object to another.
If so, divide it by the rotation of the object to turn, or if it is an offset from an object to you, divide it by your av's rot. That should do the trick. |