Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Plane barrel roll

MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
12-13-2007 19:37
ok heres what I'm looking at doing: when I press the left and right arrow keys together it makes the plane do a roll (360) with the wings rotating each other like they do in the movies, and what I am confused about is how to get it to roll only once and have it so that it will not affect the planes movement otherwise. Can anyone point some light on this issue?
edit:

heres what i have to test the rotation (using voice commands)

default
{
state_entry()
{
llListen(0, "", llGetOwner(), "";);
}
listen(integer c, string n, key id, string m)
{
if(llToLower(m) == "sb";)
{
llTargetOmega(<0,1,0>, PI, 1);
}
else if(llToLower(m) == "eb";)
{
llTargetOmega(<0,0,0>, PI, 1);
}
}
}

problem is that when I have this script (using a diff script then the plane script) do the roll it rolls on a weird axis anyway to get it to roll constantly on the X axis?
Sekker Thirroul
Registered User
Join date: 27 Aug 2006
Posts: 28
12-14-2007 03:13
Hi

If you have this in a chield prim it will rotate around its local axis rather than the rigonal axis,

Another problem you have is that llTargetOmega behaves slightly ddiferntly on physical objects compaired to none physical, none physical is esencialy a visual efect wile in physical it needs to update the movent to the simulater regulerly, no idea what efect it would have on a vehicle scripted object.
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-14-2007 04:07
target omega probably isn't what you want for this... maybe apply rotational impulse?
_____________________
|
| . "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...
| -
MCM Villiers
Registered User
Join date: 7 Oct 2007
Posts: 39
12-14-2007 10:49
so if the plane faces the x axis (the nose) I would apply the rotation how? And I tried target omega......didnt work to well...lol
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-14-2007 15:12
I haven't played with the function before, but something like
llApplyRotationalImpulse( <2, .0, .0>, TRUE );
should be right...

I'm assuming that it rotates on the acces given in the vector, and that the amount is specified in radians... either assumption could be wrong as I can't find details.... so I used X since that's the axis you are aligned on, and 4 which is a lil more than pi so it'd rotate a lil more than 180 degrees and then should be autoleveled by the physics engine after.... well that's my theory anyways... play with it and let us know =)
_____________________
|
| . "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...
| -