Page 1 of 2

Collision isn't Working Properly

Posted: Mon Dec 17, 2012 6:17 pm
by Nedarb7
I've just completed my first BF2 flyer but there is one problem:
What have I done wrong with the collision?

I followed the tutorial in my last topic
•ANDEWEGET's basic video tutorials
But the collision part doesn't seem to be working.
Does anyone know what I could have done to cause this?
It might also be something I didn't change in the odf (I used the
tiefighter odf and changed the geometry and other
random lines I thought might make it work):
Hidden/Spoiler:
[GameObjectClass]
ClassLabel = "flyer"
GeometryName = "q-wing.msh"
[Properties]
VehicleType = "fighter"
FLYERSECTION = "BODY"
HUDModel = "hud_tie_fighter_shape"
MapTexture = "tie-fighter_icon"
HealthTexture = "HUD_imp_tiefighter_icon"
VehiclePosition = "common.vehiclepositions.pilot"

MapScale = 1.5
MapViewMin = 750
MapViewMax = 750

GeometryName = "q-wing"
Label = "TIE Fighter"
//FirstPerson = "IMP\imptiftr;imp_1st_cockpit_tiefighter"
//ForceMode = "1"
CollisionScale = "1.5"
CollisionThreshold = "5"
MaxHealth = "2250"
PilotSkillRepairScale = "0.02"
TakeoffTime = "1"
TakeoffSpeed = "10"
LandingTime = "1"
LandingSpeed = "10"
TakeoffHeight = "1.5"

// PathFollower Attributes
PathFollowerClass = "imp"
PathFollowerClass_CTF = "imp_flag"
PathFollowerBranchPaths = "6"
PathFollowerBranchMaxAngle = "60"
PathFollowerMinBranchDist = "190.0"
PathFollowerBranchRange = "1500"

TimeRequiredToEject = "2.5"
EjectResistance = "0.01"
TimeTilReboard = "5.0"

SquadronFormation = "Tri-form"
SquadronFormation = "Box-form"

ExplosionDestruct = "q-wing_sc_exp"

WEAPONSECTION = "1"

WeaponName = "imp_weap_fly_tiefighter_sc_cannon"
WeaponAmmo = "0"
AimerNodeName = "hp_fire"
AimerPitchLimits = "-90 90"
AimerYawLimits = "-90 90"
NextAimer = "-"
AimerNodeName = "hp_fire1"
AimerPitchLimits = "-90 90"

AimerYawLimits = "-90 90"

CHUNKSECTION = "CHUNK1"
ChunkGeometryName = "imp_fly_tiefighter_chunk1"
ChunkTerrainCollisions = "0"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "6.0 3.0 5.5"
ChunkSpeed = "15"
ChunkUpFactor = "4"
ChunkSmokeEffect = "com_sfx_smokeplume"
ChunkSmokeNodeName = "hp_smoke2"
ChunkGravity = "0.0 0.0 0.0"
ChunkVelocityFactor = "0.15"
CHUNKSECTION = "CHUNK2"
ChunkGeometryName = "imp_fly_tiefighter_chunk2"
ChunkTerrainCollisions = "0"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "5.0 2.5 2.0"
ChunkSpeed = "12"
ChunkUpFactor = "3"
CHUNKSECTION = "CHUNK3"
ChunkGeometryName = "imp_fly_tiefighter_chunk3"
ChunkTerrainCollisions = "0"
ChunkTerrainEffect = "com_sfx_explosion_lg"
ChunkPhysics = "FULL"
ChunkOmega = "4.0 10.5 3.0"
ChunkSpeed = "12"
ChunkGravity = "0.0 0.0 0.0"

// SPARK

DamageStartPercent = "85"
DamageStopPercent = "25"
DamageEffect = "com_sfx_vehiclespark_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "75"
DamageStopPercent = "15"
DamageEffect = "com_sfx_vehiclespark_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"

// SMOKE

DamageStartPercent = "75"
DamageStopPercent = "35"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "65"
DamageStopPercent = "25"
DamageEffect = "com_sfx_vehiclesmoke_sc"
DamageEffectScale = "1"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"

// FLAME

DamageStartPercent = "35"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehicleflame_sc"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_1"

DamageStartPercent = "25"
DamageStopPercent = "0.1"
DamageEffect = "com_sfx_vehicleflame_sc"
DamageEffectScale = "0.75"
DamageInheritVelocity = "0.0"
DamageAttachPoint = "hp_damage_2"


ChunkSmokeEffect = "com_sfx_smokeplume"
ChunkSmokeNodeName = "hp_smoke1"
ChunkVelocityFactor = "0.15"
ChunkUpFactor = "3"
ChunkGravity = "0.0 0.0 0.0"
ChunkVelocityFactor = "0.15"

EnergyBar = "80"
EnergyAutoRestore = "7.5"
EnergyBoostDrain = "20"
EnergyTrickDrainSingleTap = "15"
EnergyTrickDrainDoubleTap = "30"
FirstPersonFOV = "52"
CockpitTension = "22"

PitchRate = 1.25
PitchFilter = 6.0
PitchFilterDecel = 6.0
PitchBuildupMultiplier = 1.0
TurnRate = 1.0
TurnFilter = 6.0
TurnFilterDecel = 6.0
TurnBuildupMultiplier = 1.0

BankAngle = "0.8"
BankFilter = "3.5"
LevelFilter = "1.5"
LevelFilterLanding = "5"
RollRate = "3.15"
PCPitchRate = "15"
PCSpinRate = "15"
PCTurnRate = "25"

TiltValue = "5"

AimTension = "20.0"

MoveTensionX = "2.7"
MoveTensionY = "2.7 10.0"
MoveTensionZ = "4.25"

BlurEffect = "0.9"
BlurStart = "40"
FOVEffect3rd = "90"
FOVEffect1st = "90"
Acceleraton = "40"
MinSpeed = "35"
MidSpeed = "70"
MaxSpeed = "95"
BoostAcceleration = "80"
BoostSpeed = "150"
TrickRollSpeed = "6"
TrickFlipSpeed = "6"
TrickSideRollStrafeSpeed = "30"
TrickFlipCameraDetach = "0.24"
TrickSideRollCameraDetach = "0.48"

EyePointOffset = "0.0 6.0 0.0"
TrackOffset = "0.0 0.0 0.0"
TrackCenter = "0.0 5.0 -8.0"

FOVEFFectMinCamOffset3rd = "0.0 1.0 10.0"
FOVEFFectMaxCamOffset3rd = "0.0 4.0 -15.0"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "-3.0961 5.1504 -2.2966"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "3.0961 5.1504 -2.2966"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "-3.0961-3.2369 -2.2966"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"

ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "3.0961-3.2369 -2.2966"
ContrailEffectMinScale = "0.0"
ContrailEffectMaxScale = "0.8"



ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "-3.0961 5.1504 -2.2966"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.6"
ContrailEffectMaxScale = "2.8"


ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "3.0961 5.1504 -2.2966"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.6"
ContrailEffectMaxScale = "2.8"


ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "-3.0961-3.2369 -2.2966"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.6"
ContrailEffectMaxScale = "2.8"


ContrailEffect = "com_sfx_contrail"
ContrailAttachPoint = "Q-wingfighter"
ContrailAttachOffset = "3.0961-3.2369 -2.2966"
ContrailEffectMinSpeed = "0.0"
ContrailEffectMinScale = "1.6"
ContrailEffectMaxScale = "2.8"



VOUnitType = 55
EngineSound = "imp_fly_TIE_engine_parameterized"
TakeoffSound = "imp_fly_TIE_take_off"
LandSound = "imp_fly_TIE_land"
HurtSound = "imp_weap_ord_exp_lg"
DeathSound = "imp_weap_ord_exp_lg"
VehicleCollisionSound = "com_veh_collision_lg"
TurnOnSound = "imp_fly_TIE_turn_on"
TurnOffSound = ""
TurningOffSound = "imp_fly_TIE_airbrakes_off"
TurnOffTime = "1.5"
ImpMusic = "imp_vehicle"
AllMusic = "all_vehicle"
CisMusic = "cis_vehicle"
MusicSpeed = ".15"
MusicDelay = "3.0"
AfterburnerOnSound = ""
AfterburnerOffSound = ""
AfterburnerSpeed = ""
FoleyFXGroup = "metal_foley"
Cockpit1stPersonSound = "imp_inf_com_space_chatter"
Cockpit3rdPersonSound = "imp_inf_com_space_chatter"
BoostSound = "imp_fly_TIE_shift_up_property 0.11 1"
BoostSound = "imp_fly_TIE_shift_up_property 0.53 1"
BoostSound = "imp_fly_TIE_shift_up_high_property 0.69 1"
BoostSound = "imp_fly_TIE_shift_down_property 0.17 0"
BoostSound = "imp_fly_TIE_shift_down_property 0.69 0"
TrickSound = "imp_fly_TIE_roll" //Played when the flyer performs a roll
FlipSound = "imp_fly_TIE_flip" //Played when the flyer performs a flip
ProximityMinDist = "25" // Distance from target where proximity parameter of engine is 0.
ProximityMaxDist = "100" // Distance from target where proximity parameter of engine is 1.
//MinSpeed = "35" = .23
//MidSpeed = "70" = .54
//MaxSpeed = "95" = .63 contrails at .7
//BoostSpeed = "150"

Re: Collision isn't Working Properly

Posted: Mon Dec 17, 2012 6:31 pm
by Marth8880
How do you have your collision set up? Are you using collision polymshs or collision primitives? Could you post images of your flyer's hierarchy? :o

Re: Collision isn't Working Properly

Posted: Mon Dec 17, 2012 6:44 pm
by Nedarb7
I'm using a collision polymsh here's the hierarchy:
Image

Re: Collision isn't Working Properly

Posted: Mon Dec 17, 2012 9:21 pm
by Marth8880
Ah, I see the issue. You're using collision polymshs; anything that moves, i.e., vehicles, turrets, etc., have to use collision primitives. Refer to this thread: http://www.gametoast.com/forums/viewtop ... 02#p478702

Re: Collision isn't Working Properly

Posted: Mon Dec 17, 2012 11:13 pm
by AceMastermind
This is precisely why I recommended you examine the TIE Fighter hierarchy in U3D or XSI. You can see directly how objects are named and how they were used, then you apply that knowledge to your own project.

Re: Collision isn't Working Properly

Posted: Tue Dec 18, 2012 5:21 pm
by Nedarb7
Unfortunately I still can't get it to work but I don't know why.
Here's the new hierarchy and a picture of the collision primitives:
Hidden/Spoiler:
Image
Hidden/Spoiler:
Image
If you watched the video you might have noticed that the center (for some reason)
actually has collision which just confuses me even more.
Also here's the .OPTION of the msh (Copied and renamed tie bomber .OPTION):

Code: Select all

-lodgroup bigmodel -nocollision -shadowOn 
I'm also wondering if I forgot something in the odf or set it up wrong
(because I didn't really set it up).

Re: Collision isn't Working Properly

Posted: Tue Dec 18, 2012 6:45 pm
by ANDEWEGET
If you're using the ZETools exporter you have to name your models according to the type of primitive they are.
Example:
cube primitive: p_-svbot-cube_body1
cylinder primitive: p_-svb-cyl_body2
sphere primitive: p_-bot-sphere_body3

Re: Collision isn't Working Properly

Posted: Fri Dec 21, 2012 11:32 am
by Nedarb7
Tried it but it seems as if the collision primitives are pushing against each other
(or the q-wing itself) resulting in a floating vehicle and unorganized primitives.
I have no idea what could cause this (do I have to freeze transforms?). Iv'e also
tried no collision primitives and removed "-nocollision" from the OPTION file which
worked but I could push my way into the cockpit. Any ideas?

Re: Collision isn't Working Properly

Posted: Wed Dec 26, 2012 10:19 pm
by FragMe!
in the .option file try adding -donotmergecollisions
it may or may not have an s on the end

also if you run bfmodtools and go into the menus you can turn on "render collisions" then if you do free cam you can see what the collision meshes look like on your model.

Re: Collision isn't Working Properly

Posted: Fri Dec 28, 2012 9:35 am
by Nedarb7
Thanks I'll try it out.
Do I need this line in the .OPTION as well: -nocollsion ?

Re: Collision isn't Working Properly

Posted: Fri Dec 28, 2012 2:27 pm
by LEO
Marth8880 wrote:Ah, I see the issue. You're using collision polymshs; anything that moves, i.e., vehicles, turrets, etc., have to use collision primitives. Refer to this thread: http://www.gametoast.com/forums/viewtop ... 02#p478702
thats wrong. i named the collision mesh like this collision_-svbotf-anyname

works fine

Re: Collision isn't Working Properly

Posted: Fri Dec 28, 2012 3:21 pm
by Marth8880
Not according to Pandemic, the game's developers, but whatever you say...

Re: Collision isn't Working Properly

Posted: Fri Dec 28, 2012 3:27 pm
by Nedarb7
LEO wrote:
Marth8880 wrote:Ah, I see the issue. You're using collision polymshs; anything that moves, i.e., vehicles, turrets, etc., have to use collision primitives. Refer to this thread: http://www.gametoast.com/forums/viewtop ... 02#p478702
thats wrong. i named the collision mesh like this collision_-svbotf-anyname

works fine
Before saying that "its wrong" make sure you read the whole topic and
see if it has already been corrected:
ANDEWEGET wrote:If you're using the ZETools exporter you have to name your models according to the type of primitive they are.
Example:
cube primitive: p_-svbot-cube_body1
cylinder primitive: p_-svb-cyl_body2
sphere primitive: p_-bot-sphere_body3
same as yours.

Re: Collision isn't Working Properly

Posted: Fri Dec 28, 2012 7:13 pm
by LEO
no thats not the same as mine. this is using primitves. but its correct because my way is not workin (to err is humanly)

Re: Collision isn't Working Properly

Posted: Sun Dec 30, 2012 11:58 am
by minilogoguy18
Did you scale any of the primitives? It explains it quite simply in the docs about collision primitives, if you need to change their size you can only scale cubes and leave the size at 8. Spheres and cylinders cannot be scaled, size must be changed via the primitive pop up box, you cannot change the subdivisions in U or V, you cannot edit any secondary shape components, i.e. vertex's, edges or polygons and you cannot freeze the operator stack essentially the geometry operator must be the ONLY node under the primitive.

Lastly the collision primitive should be child to the mesh that it affects and not under the root node (dummyroot).

Read

https://sites.google.com/site/swbf2modt ... Primitives

Re: Collision isn't Working Properly

Posted: Sat Aug 03, 2013 2:27 pm
by Nedarb7
I wish I didn't have to revive this but.......... Its happening all over again but I don't understand why. Here's a video showing that there's no collision geometry:
Click

Here's the set up in XSI:
Hidden/Spoiler:
Image


Any ideas?

Re: Collision isn't Working Properly

Posted: Sat Aug 03, 2013 3:09 pm
by Marth8880
I've never ever gotten cube collision primitives to work properly - I think it's a problem with the ZETools. Use cylinders or something else instead.

Re: Collision isn't Working Properly

Posted: Tue Aug 06, 2013 9:05 am
by Nedarb7
Cylinders worked, thanks Marth. Why don't the cubes? :o

Re: Collision isn't Working Properly

Posted: Tue Aug 06, 2013 9:12 am
by THEWULFMAN
Because of Zero Logic™!
For all your Zero engine needs, it's Zero Logic™!

We don't really know.

Re: Collision isn't Working Properly

Posted: Tue Aug 06, 2013 10:36 am
by Maveritchell
Nedarb7 wrote:Cylinders worked, thanks Marth. Why don't the cubes? :o
Pretty sure you used the scale tool on that cube. Any scaling that's done on an object through its properties works fine, but once you use the sidebar things get wonky. It's been a while since I've done a hover, though, so I could just be making this up.