Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Wall Won't Rot

Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
11-19-2007 01:09
Ok I know everyone is probably sick of questions about Rotation and I am trying to look up what the problem may be.

But I have a wall and it just will not rotate.

I've tried making it Physical and using llRotLookAt llLookAt everything but applying a rotational impulse which wouldn't work for what I want (to point at a specific direction).

I've tried making it non physical and using llSetRot

Nothing

It just won't budge

the rotation I'm using is sensor dependant... here's the basic script I'm using...

state_entry()
{
llSetBuoyancy(1.0);
llSetStatus(STATUS_PHYSICS,FALSE);
llSensorRepeat("", llGetOwner(), AGENT, 50.0, PI, 0.5); // sensor for the scripts owner
}

sensor(integer x)
{
rotation rot = llDetectedRot(0); // the owner's rotation
llSetRot(rot);
llSleep(2.4);
llSetStatus(STATUS_PHYSICS,TRUE);
llApplyImpulse(<0,0,0>, TRUE);
}
}

The physical variation being

state_entry()
{
llSetBuoyancy(1.0);
llSetStatus(STATUS_PHYSICS,TRUE);
llSensorRepeat("", llGetOwner(), AGENT, 50.0, PI, 0.5); // sensor for the scripts owner
}

sensor(integer x)
{
rotation rot = llDetectedRot(0); // the owner's rotation
llRotLookAt(rot, 2.0,.5);
llSleep(2.4);
llApplyImpulse(<0,0,0>, TRUE);
}
}


Any clue what I'm missing here?

I bet it's something pretty small and stupid.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-19-2007 04:34
ok, well first I can see that you can't use llApplyImpulse w/ non physical objects....same with buoyancy...

second you are applying a force vector of nothing... no direction at all because set to TRUE it's a local refrence.... the local reference of zero vector is the objects center.

rotation rot = llDetectedRot(0); // the owner's rotation
llSetRot(rot);

should work fine, just be aware it's setting the rotation to the av's facing every .5 seconds while the av is within 50m, if it's linked to something you don't want to move, make sure you use SetLocalRot

if it isn't throw in some llOwnerSay's to make sure it's getting the correct av rotation
_____________________
|
| . "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...
| -
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
11-19-2007 13:36
From: Void Singer
ok, well first I can see that you can't use llApplyImpulse w/ non physical objects....same with buoyancy...


Those are for the variation that is physical, I just didn't bother to take them out when I made it non-physical. Would that effect llSetRot?

From: someone

second you are applying a force vector of nothing... no direction at all because set to TRUE it's a local refrence.... the local reference of zero vector is the objects center.


Ah, the apply impulse is for the second part of the script, will that stop the llrotlookat function from working?

From: someone

rotation rot = llDetectedRot(0); // the owner's rotation
llSetRot(rot);

should work fine, just be aware it's setting the rotation to the av's facing every .5 seconds while the av is within 50m, if it's linked to something you don't want to move, make sure you use SetLocalRot

if it isn't throw in some llOwnerSay's to make sure it's getting the correct av rotation


I'm almost positive it is not working. The rotation never changes at all when non physical.

llOwnerSay(rot, etc... ?? If it is the owners rotation detection that is messing up, what can I do to fix this?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-19-2007 20:37
From: Rune Quinnell
llOwnerSay(rot, etc... ?? If it is the owners rotation detection that is messing up, what can I do to fix this?

submit a jira? there may be one already, I've not used detectedRot before...

as for it not working with valid ones, I can't see any obvious reasons it shouldn't, it's the exact call (well ok set Local) I use in all my door scripts for half cut doors, linked or not.
_____________________
|
| . "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...
| -
Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
11-20-2007 15:30
From: Void Singer
submit a jira? there may be one already, I've not used detectedRot before...

as for it not working with valid ones, I can't see any obvious reasons it shouldn't, it's the exact call (well ok set Local) I use in all my door scripts for half cut doors, linked or not.


What the hell is a Jira?
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
11-23-2007 01:29
Jira is the issue tracker for secondlife... where you report bugs
https://jira.secondlife.com

but the question is, are you getting no info from llDetectedRot, bad information, or what?
_____________________
|
| . "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...
| -