Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Maximum Wheelie? (Weird... they changed the forum while I wrote this.)

Kaneda Akebono
Junior Member
Join date: 7 Jun 2004
Posts: 14
06-21-2004 14:59
if(level & CONTROL_UP)
{
llSay(0, "Angle: " + (string)gAngularMotor.y);
if (gAngularMotor.y > -1)
{
gAngularMotor.y = gAngularMotor.y - gAngularRamp * (gMaxWheelieSpeed + gAngularMotor.y);
key_control = TRUE;
}

I'm attempting to make there be a point at which control up ceases to fire... essentially forcing a point beyong which a wheelie will stop angling back... However, I've tried a few solutions, and none seem to limit it. I tried the above because the gAngularMotor.y seems to be what causes the wheelie to tilt up... but it keeps cycling back to 0 once it reaches the number I set the check to. So it slows the wheelie instead of stopping it. Clearly I'm effecting the wrong part of the code, does anyone have any suggestions as to how I can do this?

-Kaneda
Neo Rebus
Registered User
Join date: 10 Apr 2004
Posts: 59
06-21-2004 15:17
I believe the problem is a misconception: the angular motor is not the *direct* angle that the vehicle is riding at, but how much that angle is changing. Therefore, if you leave the angular motor at -1, it will keep rotating.

Some of the scripts I've seen handle this by having a timer that resets the angular motor to 0 once in a while.

- Neo Rebus
Kaneda Akebono
Junior Member
Join date: 7 Jun 2004
Posts: 14
06-21-2004 15:54
Yeah. I understand the concept now, but not completely. I've been experimenting with the vehicular parameters and I'm understanding some of them, but others I'm still foggy on. But even with this I'm still not sure of a good mechanism to do what I want.

Also, so I don't have to start a new thread, what parameter controls the effect of gravity. I tried messing with Linear Friction... but that just made it deal with the terrain differently. I still took forever to decent from a "jump," which is kind of neat at times... but I mean, the way the motorcycle script is setup initially, you can litterally jump from wall to wall you decend so slowly. I'm hoping this isn't just the way SL gravity is set up and it's a parameter I'm not understanding.

-Kaneda