These forums are CLOSED. Please visit the new forums HERE
Make an object to turn.. |
|
LordHighBen Hathor
Registered User
Join date: 8 Aug 2004
Posts: 6
|
12-23-2004 15:13
Looking for an example of how to make a non physical object turn to the direction it is moving.
|
LordHighBen Hathor
Registered User
Join date: 8 Aug 2004
Posts: 6
|
Set Rot to Get Rot
12-24-2004 03:10
Well me, as i am a clever charlie, a simple set of commands as this will fix your problem-
llSetRot(llDetectedRot) Use this with a sensor command, it will find your avatar and set the objects rot to your rot, easy peasy! |
Olmy Seraph
Valued Member
![]() Join date: 1 Nov 2004
Posts: 502
|
12-24-2004 13:30
I haven't tried this myself, but it looks like llGetVel() returns the velocity. Use llGetNorm() to get the normalized vector of the velocity. Then you can use llRotBetween(<1,1,1>, normalizedVelocity) to determine the rotation. llSetRot() and you should be good.
Like I said, I haven't tried this yet. Check out http://secondlife.com/badgeo/wakka.php?wakka=Rotation for the scoop on rotation functions. _____________________
Some people are like Slinkies... not really good for anything, but they sure bring a smile to your face when you push them down the stairs.
|
Cross Lament
Loose-brained Vixen
![]() Join date: 20 Mar 2004
Posts: 1,115
|
12-24-2004 15:33
I haven't tried this myself, but it looks like llGetVel() returns the velocity. Use llGetNorm() to get the normalized vector of the velocity. Then you can use llRotBetween(<1,1,1>, normalizedVelocity) to determine the rotation. llSetRot() and you should be good. Like I said, I haven't tried this yet. Check out http://secondlife.com/badgeo/wakka.php?wakka=Rotation for the scoop on rotation functions. Shouldn't that have been llRotBetween( <1,0,0>, normalizedVelocity ) ? _____________________
- Making everyone's day just a little more surreal -
Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?" |