Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Simple disable "X" roll in a physics vehicle?

Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-28-2008 09:09
So I have a previously written physics motion code, and works fine, there are about 50 plotted points, follows them beautifully. But rocks and rolls so much. Is there a basic way to throw in an ignore "X" rolling,basically a simple code to have the vehicle level out its rotation to "0" every few turns it makes? I don't want to dig through the existing vehicle code if I don't have to. Maybe even a simple string of code somebody can throw me a link to, would be great. thanks
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
11-28-2008 09:13
Try increasing VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY and decreasing VEHICLE_VERTICAL_ATTRACTION_TIMESCALE maybe?
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-28-2008 09:29
the only point, it's not a vehicle, it's a rally to point I had written, and the kart I am using literally flips over, and over. Maybe a way to restrict movement of the X and Y variables come to think of it, or preset them so the kart knows which way is actually up.
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
11-28-2008 11:25
Well sure. You could shut them off completely with llSetStatus() using the flags STATUS_ROTATE_X and STATUS_ROTATE_Y. Might be a rather extreme solution though. Hmm. You could also try a weak llLookAt() or llRotLookAt() maybe, though you'd have to make it weak enough not to interfere much with normal turning I'd think.
Atom Burma
Registered User
Join date: 30 May 2006
Posts: 685
11-28-2008 14:21
thank, you,it was the actual function I didn't know. llSetStatus(STATUS_ROTATE_X | STATUS_ROTATE_Y | STATUS_ROTATE_Z, FALSE); gives me a few things to play with. I know it is extreme. But so is the motion. Thanks at least now I have a place to start here.