Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

making the force on a flexiprim local???

RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
07-03-2006 23:14
i notice the way a flexiprim moves will change if you roate it, is there a way to make the force local or at least act like its local?
nand Nerd
Flexi Fanatic
Join date: 4 Oct 2005
Posts: 427
07-04-2006 01:08
If you multiply a vector (i.e. your force) by a rotation (the rotation of the prim, llGetRot() ) your vector will be oriented in the same manner as your prim, i.e. <1,0,0> * llGetRot() acts along the local x-axis.

In order to use this with flexi-prims you'll need to apply it whenever you rotate your object, so if it's an attachment use a timer, if it's a static object you can set it once (in state_entry for example) and whenever the object is moved/rotated (changed event or a timer checking the position and rotation against it's last check).

llSetPrimitiveParams([FLEXIBLE_PATHS, TRUE, blah blah blah, force * llGetRot()]);
(check the semantics on the wiki)


Have fun :)
_____________________
www.nandnerd.info
http://ordinalmalaprop.com/forum - Ordinal Malaprop's Scripting Forum
Goapinoa Primeau
Addict
Join date: 29 Jun 2006
Posts: 58
07-17-2006 18:48
Check you flexiprim wind status too, sometimes theyre just blowing about in the dsirection of the wind