Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Vehicle orientation problem.

AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-18-2008 00:00
I'm a novice at vehicles and rotations don't like me.

So I have a "Balloon" style vehicle that is being moved with impulses.
eg. llApplyImpulse(azmith*force,0);
Where azmith.x and azmith.y are between -1 and +1 and azmith.z is always zero.

How can I use that azmith information to make the vehicle point its x direction in line with the motion?
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
10-18-2008 03:11
From: AnnMarie Otoole

eg. llApplyImpulse(azmith*force,0);
Where azmith.x and azmith.y are between -1 and +1 and azmith.z is always zero.

How can I use that azmith information to make the vehicle point its x direction in line with the motion?

Try: llSetRot( llGetRot()*llRotBetween( llRot2Fwd( llGetRot()), azmith ));
It is the first shot so I may not hit target:)
_____________________
From Studio Dora
AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-18-2008 15:03
Thanks that worked. I was unaware of the llRot2Fwd function.

On a related subject, why doesn't the hover height setting change the altitude?
I have buoyancy set to 1.
I have the ground hover set to 10.
It follows terrain changes nicely.
But if I change the hover to say 20m, the vehicle doesn't change altitude.
Any ideas?

(I even tried disabling Physics, doing a llSetPos(), setting the new hover height, then turn physics back on. It jumps but settles back rapidly to the OLD hover height.)
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
10-19-2008 02:41
From: AnnMarie Otoole

On a related subject, why doesn't the hover height setting change the altitude?
I have buoyancy set to 1.
I have the ground hover set to 10.
It follows terrain changes nicely.
But if I change the hover to say 20m, the vehicle doesn't change altitude.
Any ideas?

I am no expert on the subject, but I have read:
http://www.lslwiki.net/lslwiki/wakka.php?wakka=vehicles
It may be helpful:)
_____________________
From Studio Dora
AnnMarie Otoole
Addicted scripter
Join date: 6 Jan 2007
Posts: 162
10-19-2008 09:56
I was already reading that but skipped over some of the fine print.

You can't mix the llSetHoverHeight with Vehicle commands. It is ignored. You have to use llSetVehicleFloatParam(VEHICLE_HOVER_HEIGHT,nn).