Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

always rotate down?

Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
02-02-2005 15:21
All right, here I go again.

So what I'm trying to do is create a droid thing that follows me around, and since I'm a dufus with rotations I thought someone might be able to help. The bot continuously rotates towards a set target, so their nose is pointed at the person. What I need is a prim on the underbelly of the bot to always be facing down, like an engine or something.

My basic script set up is (for now) a timer event that when called every second rotates the engine prim towards the ground. I have tried using llSetRot, llRotLookAt, llSetLocalRot, and they all had some sort of effect. The prim never ends up pointing at the ground, it either constantly rotates around a certain direction or it flips back and forth between two directions. Is there an easy way to make a child prim stay in a certain rotation in relation to the ground?? I cant seem to figure it out. Any help would be nice :P
billy Madison
www.SLAuctions.com
Join date: 6 Jun 2004
Posts: 2,175
02-02-2005 15:22
:d
Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
02-02-2005 15:28
From: billy Madison
:d

oh really?
: D more like
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
02-02-2005 15:32
Maybe llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);

is what you're looking for. It should lock rotations over certain axis.

Wiki llSetStatus
billy Madison
www.SLAuctions.com
Join date: 6 Jun 2004
Posts: 2,175
02-02-2005 15:43
From: Stinky Queso
oh really?
: D more like





:eek: :eek: :eek: :eek: :eek:
Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
02-02-2005 15:44
From: Damanios Thetan
Maybe llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y, FALSE);

is what you're looking for. It should lock rotations over certain axis.

Wiki llSetStatus


not quite, I want the parent prim to rotate and set status will negate that. What I'm looking for is a bit of code that will point a child prim in a certain direction regardless of the parent prims rotation.
billy Madison
www.SLAuctions.com
Join date: 6 Jun 2004
Posts: 2,175
02-02-2005 15:46
From: Stinky Queso
not quite, I want the parent prim to rotate and set status will negate that. What I'm looking for is a bit of code that will point a child prim in a certain direction regardless of the parent prims rotation.

:confused: :rolleyes: :rolleyes: :rolleyes: :rolleyes:
Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
02-02-2005 15:51
From: billy Madison
:confused: :rolleyes: :rolleyes: :rolleyes: :rolleyes:

yeah, of course you dont understand, billy. You're too busy with the world...and zombocom
billy Madison
www.SLAuctions.com
Join date: 6 Jun 2004
Posts: 2,175
02-02-2005 15:52
zombocom? bah =\ stinky you play WOW?
Damanios Thetan
looking in
Join date: 6 Mar 2004
Posts: 992
02-02-2005 16:21
Put this in the child prim, inside either a timer (ugly), or a messagelink responding to movement/rotation of main prim.
Quick solution with timer shown:

CODE

rotation rot;

default
{
state_entry()
{
rot = llGetRot();
llSetTimerEvent(1);
}

timer()
{
llSetLocalRot(llEuler2Rot(<0,0,0>) / llGetRootRotation());
}
}

Stinky Queso
Second Life Resident
Join date: 29 Nov 2004
Posts: 53
02-02-2005 16:23
From: Damanios Thetan
Put this in the child prim, inside either a timer (ugly), or a messagelink responding to movement/rotation of main prim.
Quick solution with timer shown:



oh dear god! thats it? I'm such a retard with rotations. Thanks a lot
billy Madison
www.SLAuctions.com
Join date: 6 Jun 2004
Posts: 2,175
02-02-2005 16:25
Answer Me