|
Maximilian Legend
Registered User
Join date: 1 Jun 2008
Posts: 3
|
11-03-2008 21:31
is it possible to keep a prim oriented to a fixed direction? like a compass? by example keeping the direction only on the north ?
thank you
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-03-2008 23:00
by moving it, yes.
if it's attached, it gets messy, because it reports attachment point rotation, which is relative to the av IIRC (and doesn't include any changes made by animation, which would trow it off for about anything but a hud)
in a physics environment llSetStatus will allow you keep the object from rotating around any of the 3 axis, but it can't be attached to the container... dunno how that would behave as an attachment
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|
|
Maximilian Legend
Registered User
Join date: 1 Jun 2008
Posts: 3
|
11-08-2008 14:20
From: Void Singer by moving it, yes.
if it's attached, it gets messy, because it reports attachment point rotation, which is relative to the av IIRC (and doesn't include any changes made by animation, which would trow it off for about anything but a hud)
in a physics environment llSetStatus will allow you keep the object from rotating around any of the 3 axis, but it can't be attached to the container... dunno how that would behave as an attachment Thank you Void, in this case...what about a texture? can a texture to be set to a specific direction and keeping this even if the object changes the direction ? thank you
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
11-08-2008 15:14
rotation global = ZERO_ROTATION;
integer started = FALSE;
default { state_entry() { llSetTimerEvent(0.25); } } timer() { llSetLocalRot(global / llGetRootRotation()); } }
/me fades away into the forum framework
|
|
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
|
11-08-2008 18:00
From: Maximilian Legend Thank you Void, in this case...what about a texture? can a texture to be set to a specific direction and keeping this even if the object changes the direction ?
thank you yes I believe so, but annoying to code since you'd be converting the rotation of the object to offsets and rotation of image on the prim... possibly even per side for anything but a sphere. on the plus side IIRC you don't have to worry about bounds, since those are automatically scaled back to sane values (for instance rotations greater than +/-180deg, or offsets greater than +/-50%)... at least that's what I remember. I did do a flight style hud bubble compass sometime back... and found that the easiest way was to texture the INSIDE of the sphere, and use setRot to cancel the difference in avatar rotation... it'd be even easier to do in a vehicle mounted setting.
_____________________
| | . "Cat-Like Typing Detected" | . This post may contain errors in logic, spelling, and | . grammar known to the SL populace to cause confusion | | - Please Use PHP tags when posting scripts/code, Thanks. | - Can't See PHP or URL Tags Correctly? Check Out This Link... | - 
|