llTargetOmega(<0,1,0>,1,10.0);
How do I turn something at the same speed, but at a 45 degree angle?
llTargetOmega(<.5,.5,0>,1,10.0); is too slow
llTargetOmega(<1,1,0>,1,10.0); is too fast
I feel like i'm missing something here
thanks
These forums are CLOSED. Please visit the new forums HERE
llTargetOmega help |
|
Lasivian Leandros
Hopelessly Obsessed
Join date: 11 Jul 2005
Posts: 238
|
08-13-2005 16:59
llTargetOmega(<0,1,0>,1,10.0);
How do I turn something at the same speed, but at a 45 degree angle? llTargetOmega(<.5,.5,0>,1,10.0); is too slow llTargetOmega(<1,1,0>,1,10.0); is too fast I feel like i'm missing something here thanks |
Christopher Omega
Oxymoron
Join date: 28 Mar 2003
Posts: 1,828
|
08-13-2005 18:27
Try this:
llTargetOmega(llVecNorm(<1, 1, 0> ![]() That first vector is a direction for the turn, but llTargetOmega doesnt seem to normalize it before applying it to the object, so if you pass <2, 0, 0> rather then <1, 0, 0>, it goes faster. The second parameter of llTargetOmega is supposed to be the speed of the turn, but its just multiplied by the first value. Why <1, 1, 0> by itself was too fast, was because the distance between <0, 0, 0> and <1, 1, 0> is more then 1, it's sqrt(2), or about 1.414, to be exact, so it was traveling at 1.414 radians/second. llVecNorm "normalizes" the vector passed to it so the distance between the vector and <0, 0, 0> is 1, in other words, it makes the vector a unit vector. <1, 0, 0> was originally a unit vector, so since the second parameter was 1.0, the object traveled at 1.0 radians/second. Hope this helps ![]() ==Chris _____________________
October 3rd is the Day Against DRM (Digital Restrictions Management), learn more at http://www.defectivebydesign.org/what_is_drm
|
Lasivian Leandros
Hopelessly Obsessed
Join date: 11 Jul 2005
Posts: 238
|
08-15-2005 14:03
Worked great, thanks alot!
|