Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

'Nose in' with hover and car mode

Merana Levy
Ooo.. shiny!
Join date: 10 Aug 2004
Posts: 6
09-13-2004 23:16
Okay, I've made some headway on the jetbike using a horribly tweaked version of the publically avalible motorcycle code. however I've been having a rather pecular problem: It likes to drop the nose to point at the ground.

I've tried a lot to fix this and nothing appears to last.. slowly but surely, the nose points at the ground. This seems odd, because the majority of the prims of the vehicle are -behind- the driver. Any suggestions?

- Merana
Chage McCoy
Aerodrome Janitor
Join date: 23 Apr 2004
Posts: 336
09-13-2004 23:32
This is a common problem with the physics engine, and is to do with the center of mass of the vehicle.

Unfortunately the problem with this is that the only thing that changes the mass of a prim is its size, not the material its made from.

my only suggestion would be to move prims towards the back of the motorcycle
Apotheus Silverman
I write code.
Join date: 17 Nov 2003
Posts: 416
09-14-2004 08:33
You can use vertical attraction for both the x and y axes to correct this.

// This first line is *probably* all you really need to add to your script
llRemoveVehicleFlags(VEHICLE_FLAG_LIMIT_ROLL_ONLY);
// Modify these to suit your vehicle
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_TIMESCALE, 1.0);
llSetVehicleFloatParam(VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY, 1.0);
_____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com

Visit Abbotts Aerodrome for gobs of flying fun.
Merana Levy
Ooo.. shiny!
Join date: 10 Aug 2004
Posts: 6
Vertical attractor
09-15-2004 16:43
That code is allready in the script, unfortunately. I'm thinking it may be a prim-balance issue. Now is it the density of prims that determines center of mass, or the size of the prims? because I've got more prims near the back, but a larger prim forward of the centerline..
Apotheus Silverman
I write code.
Join date: 17 Nov 2003
Posts: 416
09-15-2004 16:55
If you are 100% absolutely without-a-doubt sure that you have vertical attraction enabled and of sufficient strength for both the x and y axes and there are no other forces acting on the vehicle, then there is no way it will tend to lean in any direction unless your VEHICLE_REFERENCE_FRAME is set incorrectly.

So... I'd suggest you check that as your next step. Beyond that, all I can suggest is that you may have made some fatal error along the way. :-)
_____________________
Apotheus Silverman
Shop SL on the web - SLExchange.com

Visit Abbotts Aerodrome for gobs of flying fun.