Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Making a Vehicle Stay Still.

Rebecca Naidoo
Registered User
Join date: 28 May 2008
Posts: 82
08-20-2008 12:08
Hi.

I'm looking to make a vehicle that does not move, it needs to hover in the air at the same location while a user uses the vehicle class to rotate it.

Could someone help me out with how to make it stay still
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
08-20-2008 16:02
look into llSetRotation() and llSetPos()

wiki.secondlife.com
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
08-20-2008 17:00
From: Rebecca Naidoo
Hi.

I'm looking to make a vehicle that does not move, it needs to hover in the air at the same location while a user uses the vehicle class to rotate it.

Could someone help me out with how to make it stay still

I guess it is a physical wehicle we are talking about?
In that case these lines will bring it to a halt:
llSetVehicleFloatParam( VEHICLE_BUOYANCY, 1 );
gLinearMotor = ZERO_VECTOR;
llSetVehicleVectorParam(VEHICLE_LINEAR_MOTOR_DIRECTION, gLinearMotor);
angular_motor = ZERO_VECTOR;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);

The HOVER parameters may come into play depending of what you want

In order to turn it around the Z axis change the Z component for the angular motor:
angular_motor = < 0.0, 0.0, something_you_choose >;
llSetVehicleVectorParam(VEHICLE_ANGULAR_MOTOR_DIRECTION, angular_motor);

Remember a resting vehicle may be pushed:)
_____________________
From Studio Dora
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
08-21-2008 04:57
From: Dora Gustafson
Remember a resting vehicle may be pushed:)

I had a floating physical object that I locked to prevent this from happening, but I didn't ask anyone to try and move it, so I don't know if this is actually solved it or not, all I know is that it didn't move after that.
_____________________
Dora Gustafson
Registered User
Join date: 13 Mar 2007
Posts: 779
08-21-2008 07:33
From: Dekka Raymaker
I had a floating physical object that I locked to prevent this from happening, but I didn't ask anyone to try and move it, so I don't know if this is actually solved it or not, all I know is that it didn't move after that.

You are talking about grabbing (llSetStatus(STATUS_BLOCK_GRAB,TRUE); ), are you not?
I had pushing on my mind like pushing by a pushing script (llPushObject) or simply when an object is pushed by someone or something bumping into it.
_____________________
From Studio Dora
Dekka Raymaker
thinking very hard
Join date: 4 Feb 2007
Posts: 3,898
08-22-2008 04:49
Dora your more than likely correct.
_____________________