Havok Vehicles bouncing everywhere!

Havok Vehicles bouncing everywhere!

Wesley C.'s picture

 

So I have a base code layout that uses Ogre and Havok, a model loading in, but my Havok Vehicle is bouncing all over the place and being figity. Sometimes it steadies, but when I try to move it using steering or throttle, nothing happens. The wheels will spin, and will even change direction when I tell it to but the vehicle simply stays put! Here is also my current text document of values for the vehicle. Also, here are some basic parameters I have set in Maya. Sorry if this question has been answered before but I'm trying my best and I really want to learn how to make the Havok Vehicles as cool as they are in the demo's. Which also leads me to, yes, I have been carefully analyzing the VehicleAPI.h and .cpp files to make sure I wasn't messing up anything blatant. Any advice from you guys would be fantastic! Thank you :D PS. I attached two pictures of the tank, one in the program and the other in the visual debugger. 

Mass: 16000

Shape Type: Hull

Text Docuement:

; This file has been completely copied over from DefaultVehicle.ini
; Remember, DefaultVehicle should NOT be modified

[DATA]
; Vehicle's orientation
Orientation0X = 0
Orientation0Y = 1
Orientation0Z = 0

Orientation1X = 1
Orientation1Y = 0
Orientation1Z = 0

Orientation2X = 0
Orientation2Y = 0
Orientation2Z = 1

; Specifies how the effect of dynamic load distribution is averaged with static load distribution.     
; A value of 0.0f doesn't do any averaging (dynamic load distribution is fully taken into account).
; A value of 1.0f doesn't take dynamic load distribution, and the car behaves always as if it was in 
; static load distribution. Values between 0.0f and 1.0f give a certain amount of both.
FrictionEqualizer = 0.5

; torque roll, pitch and yaw
TorqueRollFactor     = 0.625
TorquePitchFactor     = 0.5
TorqueYawFactor         = 0.35

; inertia yaw, pitch and roll
InertiaYaw         = 1.0
InertiaRoll     = 1.0 
InertiaPitch     = 1.0

; Extra torque applied to the steering when it moves left or right (tweaker)
ExtraTorqueFactor = -0.5

; To avoid sliding at slow speeds or when the handbrake is turned on, we 
; introduced a positional friction model
MaxVelocityForPositionalFriction = 0.0

; Information regarding the wheels
NumWheels = 4

; The following parameters are specific to each vehicle
;-----------------------------------------------
Wheel0Axle = 0
Wheel1Axle = 0
Wheel2Axle = 1
Wheel3Axle = 1

Wheel0Friction = 0.8
Wheel1Friction = 0.8
Wheel2Friction = 0.4
Wheel3Friction = 0.4

Wheel0SlipAngle = 0.0
Wheel1SlipAngle = 0.0
Wheel2SlipAngle = 0.0
Wheel3SlipAngle = 0.0

Wheel0Radius    = 0.1
Wheel1Radius    = 0.1
Wheel2Radius     = 0.1
Wheel3Radius    = 0.1

Wheel0Width        = 0.2
Wheel1Width        = 0.2
Wheel2Width        = 0.2
Wheel3Width        = 0.2

Wheel0Mass        = 1.0
Wheel1Mass        = 1.0
Wheel2Mass        = 1.0
Wheel3Mass        = 1.0

Wheel0ViscosityFriction = 0.25
Wheel1ViscosityFriction = 0.25
Wheel2ViscosityFriction = 0.25
Wheel3ViscosityFriction = 0.25

; this is a multiplier. It multiplies the value with the wheel's friction
Wheel0MaxFriction = 2.0
Wheel1MaxFriction = 2.0
Wheel2MaxFriction = 2.0
Wheel3MaxFriction = 2.0

Wheel0ForceFeedBackMultiplier = 0.1
Wheel1ForceFeedBackMultiplier = 0.1
Wheel2ForceFeedBackMultiplier = 0.1
Wheel3ForceFeedBackMultiplier = 0.1

; This is a multiplier which mutiplies with lData->m_gravity.length3()
Wheel0MaxContactBodyAcceleration = 0.0
Wheel1MaxContactBodyAcceleration = 0.0
Wheel2MaxContactBodyAcceleration = 0.0
Wheel3MaxContactBodyAcceleration = 0.0
;-----------------------------------------------

;Tyre marks number of points
TyreMarksPoints = 128

[DRIVER_INPUT]
SlopeChangePointX     = 0.8
InitialSlope         = 0.7
DeadZone             = 0.0
AutoReverse         = true

[STEERING]
; This should be multiplied by (pi / 180)
MaxSteeringAngle                 = 35.0
MaxSpeedFullSteeringStrength     = 70.0

DoesWheel0Steer                    = true
DoesWheel1Steer                    = true
DoesWheel2Steer                    = false
DoesWheel3Steer                    = false

[ENGINE]
MaxTorque         = 500.0
MinRPM            = 1000.0
OptRPM            = 5500.0
MaxRPM            = 7500.0

TorqueFactorAtMinRPM = 0.8
TorqueFactorAtMaxRPM = 0.8

ResistanceFactorAtMinRPM = 0.05
ResistanceFactorAtOptRPM = 0.1
ResistanceFactorAtMaxRPM = 0.3

[TRANSMISSION]
NumGears = 4

DownShiftRPM        = 3500.0
UpShiftRPM            = 6500.0

ClutchDelayTime        = 0.0
ReverseGearRatio    = 1.0

Gear0Ratio            = 0.1
Gear1Ratio            = 1.5
Gear2Ratio            = 1.0
Gear3Ratio            = 0.75

Wheel0TorqueRatio    = 0.7
Wheel1TorqueRatio    = 0.7
Wheel2TorqueRatio    = 0.7
Wheel3TorqueRatio    = 0.7

VehicleTopSpeed        = 50.0
WheelRadius            = 0.07
MaxEngineRPM        = 7500.0

[BRAKE]
Wheel0MaxBreakingTorque = 15.0
Wheel1MaxBreakingTorque = 15.0
Wheel2MaxBreakingTorque = 15.0
Wheel3MaxBreakingTorque = 15.0

Wheel0ConnectedToHandbrake = false
Wheel1ConnectedToHandbrake = false
Wheel2ConnectedToHandbrake = true
Wheel3ConnectedToHandbrake = true

Wheel0MinPedalInputToBlock = 0.9
Wheel1MinPedalInputToBlock = 0.9
Wheel2MinPedalInputToBlock = 0.9
Wheel3MinPedalInputToBlock = 0.9

WheelsMinTimeToBlock    = 1000.0

[SUSPENSION]
; This (suspension length) should realistically be grabbed from Maya

; This is the suspension length for each wheel
; This has to be more than the wheel radius
Wheel0Length    = 0.8
Wheel1Length    = 0.8
Wheel2Length    = 0.8
Wheel3Length    = 0.8

Wheel0Strength    = 60.0
Wheel1Strength    = 60.0
Wheel2Strength    = 60.0
Wheel3Strength    = 60.0

Wheel0DampingCompression = 0.9
Wheel1DampingCompression = 0.9
Wheel2DampingCompression = 0.9
Wheel3DampingCompression = 0.9

Wheel0DampingRelaxation     = 0.9
Wheel1DampingRelaxation     = 0.9
Wheel2DampingRelaxation     = 0.9
Wheel3DampingRelaxation     = 0.9

; Hardpoints - again, this should be grabbed from Maya
Wheel0HardPointX    = 7
Wheel0HardPointY    = -3
Wheel0HardPointZ    = -5

Wheel1HardPointX    = 7
Wheel1HardPointY    = -3
Wheel1HardPointZ    = 5

Wheel2HardPointX    = -7
Wheel2HardPointY    = -3
Wheel2HardPointZ    = -5

Wheel3HardPointX    = -7
Wheel3HardPointY    = -3
Wheel3HardPointZ    = 5

Wheel0DownDirectionX    = 0.0
Wheel0DownDirectionY    = -1.0
Wheel0DownDirectionZ    = 0.0

Wheel1DownDirectionX    = 0.0
Wheel1DownDirectionY    = -1.0
Wheel1DownDirectionZ    = 0.0

Wheel2DownDirectionX    = 0.0
Wheel2DownDirectionY    = -1.0
Wheel2DownDirectionZ    = 0.0

Wheel3DownDirectionX    = 0.0
Wheel3DownDirectionY    = -1.0
Wheel3DownDirectionZ    = 0.0

[AERODYNAMICS]
AirDensity    = 1.3
FrontalArea    = 1.0
DragCoefficient    = 0.7
LiftCoefficient    = -0.3

ExtraGravityX    = 0.0
ExtraGravityY    = -5.0
ExtraGravityZ    = 0.0

[VELOCITY_DAMPERS]
NormalSpinDamping    = 0.0

CollisionSpinDamping = 4.0

CollisionThreshold    = 1.0

 

AttachmentSize
Download tank.jpg21.25 KB
Download tank_db.jpg169.76 KB
1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.