Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Force/impulse Always one direction

Rune Quinnell
Registered User
Join date: 25 Aug 2007
Posts: 28
12-13-2007 19:33
does anyone know what this error is?

I have a physical object I want to move in multiple directions.

No matter how much I change the llSetForce or llApplyImpulse vectors the object goes in the same direction.

The only change I can make is whether the vectors are local or not but this just makes the object go in a different single direction no matter what the vectors of the call are.

What is going on.

llSetForce(<0,0,10>, TRUE);

gets the same result as

llSetForce(<10,0,0>, TRUE);

What the hell?
Cid Jacobs
Theoretical Meteorologist
Join date: 18 Jul 2004
Posts: 4,304
12-18-2007 16:48
Try using llRot2Fwd llRot2Up or llRot2Left multiplied by the value speed you want.
_____________________
Void Singer
Int vSelf = Sing(void);
Join date: 24 Sep 2005
Posts: 6,973
12-18-2007 23:19
From: Rune Quinnell
does anyone know what this error is?

I have a physical object I want to move in multiple directions.

No matter how much I change the llSetForce or llApplyImpulse vectors the object goes in the same direction.

The only change I can make is whether the vectors are local or not but this just makes the object go in a different single direction no matter what the vectors of the call are.

What is going on.

llSetForce(<0,0,10>, TRUE);

gets the same result as

llSetForce(<10,0,0>, TRUE);

What the hell?


you say you want it to go in multiple directions.... but then you say it goes in different single directions.... so I'm confused.... are you wanting it to go in a direction on multiple axis? if so then just add your vector of the direction you want it to go in instead of a single axis...

ex.
llSetForce(<5,0,5>, FALSE); //--sends the object up and east regrdless or facing
llSetForce(<5,0,5>, TRUE); //--send the object local top and local forward (assuming it's facing is east at zero rotation)

for ease of calculation use
llSetForce( totalForce2Apply * llVecNorm( <1,0,1> ), TRUE ); //--or false if you want region coordinates, negative numbers work too
_____________________
|
| . "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...
| -