Vehicle's center of gravity is off. :O [Solved]

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Vehicle's center of gravity is off. :O [Solved]

Post by Marth8880 »

So uhh, the Mako is being a penguin right now. I dunno what happened. When I added the smaller turret, uhh...this...started to happen...

lolwut.jpg
Hidden/Spoiler:
Image
The vehicle now has this honest, stupid, idiotic belief that its center of gravity is suddenly in the rear-left wheel. I dunno how it happened. Any ideas? :o Typically I'm able to figure these things out by myself, but this time...not so much. Collision should be right, I checked it and haven't changed it...


lolindepthnessSSSSss.avi
Hidden/Spoiler:
Image
ssv_tread_mako.odf
Hidden/Spoiler:
[code][GameObjectClass]

ClassLabel = "hover"
GeometryName = "m35_mako.msh"

[Properties]

HUDModel = "hud_m35_shape"
Label = "M-35 Mako"

FLYERSECTION = "BODY"
VehicleType = "heavy"
AISizeType = "LARGE"
//AvailableForAnyTeam = 1

MapTexture = "mako_icon"
HealthTexture = "HUD_rep_fightertank_icon"
VehiclePosition = "common.vehiclepositions.pilot"
MapScale = 1.5

WaterEffect = "com_sfx_waterwake_lg"

GeometryName = "m35_mako"
//ExplosionName = "rep_hover_fightertank_exp"

//AnimationName = "rep_hover_fightertank"
//FinAnimation = "mako_9pose"

CollisionScale = 0.5
CollisionThreshold = 15.0

MaxHealth = 4600.0
MaxShield = 7200.0
AddShield = 90.0

TimeRequiredToEject = "7.5"
EjectResistance = "0.02"
TimeTilReboard = "5.0"

HealthType = "vehicle"

//FirstPerson = "REP\repftrtk;rep_1st_cockpit_fightertank"
FirstPersonFOV = "55"

SetAltitude = 0.01
GravityScale = 6.0
LiftSpring = 2.0 //Suspension tightness. High is a firm rugged ride, low is floaty and smooth
LiftDamp = 4.5 //Shock Absorber. High corrects quickly, low causes it to bounce and over correct alot.

Acceleration = 40.0
Deceleration = 32.0
Traction = 35.0
ForwardSpeed = 19.0
ReverseSpeed = 15.0
StrafeSpeed = 0.0

EnergyBar = 100
EnergyAutoRestore = 20.0
EnergyBoostDrain = 25.0
//BoostSpeed = 20
//BoostAcceleration = 100.0
//BoostFOV = 60


//////********PHYSICS-START********//////

// Front wheels
AddSpringBody = "-2.6 0.0 2.2 2.3"
BodySpringLength = 1.0

AddSpringBody = "2.6 0.0 2.2 2.3"
BodySpringLength = 1.0

// Middle wheels
AddSpringBody = "-2.6 0.0 -2.0 2.3"
BodySpringLength = 1.0
//BodyOmegaXSpringFactor = 1.2

AddSpringBody = "2.6 0.0 -2.0 2.3"
BodySpringLength = 1.0
//BodyOmegaXSpringFactor = 1.2

// Rear wheels
AddSpringBody = "-2.6 0.0 -4.25 1.4"
BodySpringLength = 1.0

AddSpringBody = "2.6 0.0 -4.25 1.4"
BodySpringLength = 1.0

VelocitySpring = 5
VelocityDamp = 2.5
OmegaXSpring = 3.0
OmegaXDamp = 3.0
OmegaZSpring = 5.0
OmegaZDamp = 1.5
//////********PHYSICS-END********//////


CockpitTension = 20

SpinRate = 0.0
TurnRate = 1.7
TurnFilter = 10.0
PitchRate = 0.5
PitchFilter = 10.0

StrafeRollAngle = 0.01
ThrustPitchAngle = 0.0
BankAngle = -0.01
BankFilter = 3.0 //low is slow - How quickly the bank returns to level
LevelSpring = 5.0 //low is slow - the force the restores level
LevelDamp = 4.0 //low is slow - the force that reduces the momentum of the rotation

JumpTimeMin = 0.05
JumpTimeMax = 0.9
JumpForce = 50.0
JumpMinSpeedMult = 0.0
JumpEnergyPerSec = 70.0

PCPitchRate = "15.0"
PCSpinRate = "25.0"
PCTurnRate = "30.0"


EyePointOffset = "0.0 5.0 -15.0"
TrackCenter = "0.0 6.0 -15.0" // needs to be changed back to 0.0 1.0 -5.0 when artists move center point
TrackOffset = "0.0 0.75 8.5"
TiltValue = "7.0"

PitchLimits = "-8.0 25.0"
YawLimits = "0.0 0.0"


//HitLocation = "p_crithit 4.0"

//TargetableCollision = "p_target"


FLYERSECTION = "TURRET1"

VehiclePosition = "common.vehiclepositions.gunner"

PilotPosition = "hp_gunner"
//Pilot9Pose = "minigun_9pose"
//FirstPerson = "rep\repsccam;rep_1st_cockpit_securitycam"

PitchTurnFactor = "0.0"

EyePointOffset = "0.0 2.0 -3.0"
TrackCenter = "0.0 2.0 -3.0" // 0.0 2.0 -7.0
TrackOffset = "0.0 0.0 5.0"
TiltValue = "3.0"

TurretNodeName = "turret_cannon_root"
PitchLimits = "-15.0 15.0"
YawLimits = "-180.0 180.0"
TurnRate = 1.8
TurnFilter = 10.0
PitchRate = 0.5
PitchFilter = 15.0


WEAPONSECTION = 1

WeaponName = "ssv_weap_tread_mako_cannon"
WeaponAmmo = 0

//HierarchyLevel = 1
AimerNodeName = "turret_aimer_cannon"
AimerPitchLimits = "-18.0 25.0"
AimerYawLimits = "-180.0 180.0"
FireOutsideLimits = "1"

BarrelNodeName = "turret_cannon_barrel"
BarrelRecoil = 0.25
FirePointName = "turret_cannon_fire"

ForceMode = 1


FLYERSECTION = "TURRET2"

VehiclePosition = "common.vehiclepositions.gunner"

PilotPosition = "hp_gunner"
//Pilot9Pose = "minigun_9pose"
//FirstPerson = "rep\repsccam;rep_1st_cockpit_securitycam"

PitchTurnFactor = "0.0"

EyePointOffset = "0.0 1.0 -1.5"
TrackCenter = "0.0 1.0 -1.5" // 0.0 2.0 -7.0
TrackOffset = "0.0 0.0 2.5"
TiltValue = "3.0"

TurretNodeName = "turret_gun_root"
PitchLimits = "-15.0 15.0"
YawLimits = "-180.0 180.0"
TurnRate = 1.8
TurnFilter = 10.0
PitchRate = 0.5
PitchFilter = 15.0


WEAPONSECTION = 1

WeaponName = "ssv_weap_tread_mako_gun"
WeaponAmmo = 0

//HierarchyLevel = 1
AimerNodeName = "turret_aimer_gun"
AimerPitchLimits = "-18.0 25.0"
AimerYawLimits = "-180.0 180.0"
FireOutsideLimits = "1"

BarrelNodeName = "turret_gun_barrel"
BarrelRecoil = 0.25
FirePointName = "turret_gun_fire"

ForceMode = 1


FLYERSECTION = "TURRET3"

VehiclePosition = "common.vehiclepositions.passenger"

ForceMode = 1
ThirdPersonFOV = 59.5
PitchRate = 0.8
PitchFilter = 2.75
TurnRate = 1.3
TurnFilter = 2.75

PitchLimits = "-15.0 25.0"
YawLimits = "-180.0 180.0"

PCPitchTurnFactor = "20.0"
PCYawTurnFactor = "20.0"

PitchTurnFactor = "1.0"
YawTurnFactor = "1.0"

MountPos = "0.0 -0.75 1.75"
EyePointOffset = "0.0 5.0 -15.0"
TrackCenter = "0.0 6.0 -15.0" // needs to be changed back to 0.0 1.0 -5.0 when artists move center point
TrackOffset = "0.0 0.75 8.5"
TiltValue = "7.0"

//ControlsUnit = "1"
//PilotPosition = "hp_passenger1"
//PilotAnimation = "standing"


TurretYawSound = "turret_whir_yaw_lp"
TurretYawSoundPitch = "0.7"
TurretPitchSound = "turret_whir_pitch_lp"
TurretPitchSoundPitch = "0.7"
TurretAmbientSound = ""
TurretActivateSound = "vehicle_equip"
TurretDeactivateSound = ""
TurretStartSound = ""
TurretStopSound = ""


VOUnitType = 124
EngineSound = "interceptorTank_engine_parameterized"
HurtSound = ""
DeathSound = "imp_weap_ord_exp_lg"
VehicleCollisionSound ="com_veh_collision_lg"
TurnOnSound = ""
TurnOffSound = ""
CisMusic = "ssv_amb_03_mid"
RepMusic = "ssv_amb_03_mid"
MusicSpeed = "0.0"
MusicDelay = "3.0"
GroundedSound = ""
GroundedHeight = ""
FoleyFXGroup = "metal_foley"[/code]
Last edited by Marth8880 on Fri Aug 24, 2012 1:23 am, edited 1 time in total.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Vehicle's center of gravity is off. :O

Post by FragMe! »

Can't see the pics because my work computer doesn't trust your website but try playing with the spring bodies. Noticed the rear wheel set is slightly different than the other two sets.
The 4th number in the string.

Code: Select all

// Front wheels
AddSpringBody = "-2.6 0.0 2.2 2.3"
BodySpringLength = 1.0

AddSpringBody = "2.6 0.0 2.2 2.3"
BodySpringLength = 1.0

// Middle wheels
AddSpringBody = "-2.6 0.0 -2.0 2.3"
BodySpringLength = 1.0
//BodyOmegaXSpringFactor = 1.2

AddSpringBody = "2.6 0.0 -2.0 2.3"
BodySpringLength = 1.0
//BodyOmegaXSpringFactor = 1.2

// Rear wheels
AddSpringBody = "-2.6 0.0 -4.25 1.4"
BodySpringLength = 1.0

AddSpringBody = "2.6 0.0 -4.25 1.4"
BodySpringLength = 1.0
You can also see how the spring bodies line up by turning on render collision in bfmodtools and looking at the vehicle in free cam mode.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Vehicle's center of gravity is off. :O

Post by Marth8880 »

Hmm, changing the values to 2.3 didn't seem to do anything. :o


So I'm looking at the terrain collision in the debugger... The heck?!?!
Hidden/Spoiler:
Image
Image
That is so wrong...I have many more terrain collision primitives than that, and I don't even have any freakin' spheres! :o
Hidden/Spoiler:
Image
Image
What exactly does SetSpringBody, BodySpringLengthRadiusMultiplier, BodySpringLengthRadiusMultiplier, BodyVelocityDampFactor, BodyOmegaXSpringFactor, BodyOmegaXDampFactor, BodyOmegaZSpringFactor, BodyOmegaZDampFactor, BodySpringLength, VelocitySpring, VelocityDamp, OmegaXSpring, OmegaXDamp, OmegaZSpring, OmegaZDamp, and the fourth value of AddSpringBody do, anyway? Lotsa questions, I know lol; I've just always been curious about these. :o

I'm also curious about SuspensionNodeName, SuspensionLeftArmNodeName, SuspensionRightArmNodeName, SuspensionMaxOffset, and SuspensionMidOffset; the only vehicles that have the Suspension parameters are cis_tread_hailfire and cis_tread_snailtank.


EDIT:

Hmm, I'm looking at the collision some more in the debugger and it turns out the correct collision only shows up as vehicle (rigid) collision when the only rigid collision I have set is a cube encompassing the entire vehicle. This is complete nonsense. :roll:
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Vehicle's center of gravity is off. :O

Post by FragMe! »

The spheres are the spring bodies, they give bounciness obviously. If you change the last number if I remember correctly that changes the diameter. The first 3 are the x y and z positions.
You may have to enable more collision renders to see the spring bodies.

You may have to remove the terrain collision prims, I had something once where I had put them on and it stopped the vehicle from moving. I could have just been me playing around with too many things at once though.

The damping affects how quickly the vehicle settles down after a jump. The others not so sure but playing is always fun but expect some wierdness, I had a dancing vehicle once while playing with the spring bodies.

Played with suspension arms as well but never got it to do anything except tilt the wheels on my buggy inwards. Was hoping for some kind of wheel movement as I went over bumps.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Vehicle's center of gravity is off. :O

Post by Marth8880 »

Ah, alright, thanks for that info lol.
FragMe! wrote:You may have to remove the terrain collision prims, I had something once where I had put them on and it stopped the vehicle from moving.
What do you mean? Just like, remove them completely or what?
User avatar
minilogoguy18
Master Bounty Hunter
Master Bounty Hunter
Posts: 1512
Joined: Wed Nov 09, 2005 11:12 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set

Re: Vehicle's center of gravity is off. :O

Post by minilogoguy18 »

Your primitives may be set up wrong, on primitives you cannot edit anything with cylinders other than the length and diameter slider, anything that changes the subdivisions should be left alone. Also any component modification breaks this as well as freezing the geometry, consult the docs.
FragMe!
Gametoast Staff
Gametoast Staff
Posts: 2244
Joined: Sat May 13, 2006 12:34 am
Projects :: Not sure keep changing my mind.
Games I'm Playing :: F1 and SWBF
xbox live or psn: No gamertag set
Location: Origin name GT_FragMe
Contact:

Re: Vehicle's center of gravity is off. :O

Post by FragMe! »

Actualyl just went back and checked the buggy and it has svbot collision for the wheels so that is fine (btw what is the u in your collision prims names?)

can see the pictures now those do look like spring bodies.
The numbers do closely match measurement is XSI, 1 in the number @ 1 square in XSI which should help position the spring bodies. If you find your vehicle floating, make the y height greater.
position the spring bodies where the wheels are. If you find your vehicle starts dancing try removing the middle set.

Oh and I think 6 is the max amount of spring bodies just in case you were interested.
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Vehicle's center of gravity is off. :O

Post by Marth8880 »

minilogoguy18 wrote:Your primitives may be set up wrong, on primitives you cannot edit anything with cylinders other than the length and diameter slider, anything that changes the subdivisions should be left alone. Also any component modification breaks this as well as freezing the geometry, consult the docs.
They aren't. I'm positive.
FragMe! wrote:Actualyl just went back and checked the buggy and it has svbot collision for the wheels so that is fine (btw what is the u in your collision prims names?)

can see the pictures now those do look like spring bodies.
The numbers do closely match measurement is XSI, 1 in the number @ 1 square in XSI which should help position the spring bodies. If you find your vehicle floating, make the y height greater.
position the spring bodies where the wheels are. If you find your vehicle starts dancing try removing the middle set.

Oh and I think 6 is the max amount of spring bodies just in case you were interested.
Alright, thanks. :)


Well anyway, I fixed the problem by removing the machine gun turret's collision primitive from the hierarchy. No clue why it fixed it, but whatever. I'll just go with it, for now... :chew:
Post Reply