I want vehicles to have usual collision physics with everything except other vehicles.
This is for a racing style map with the same concept as Trackmania...
A simple initial fix was to remove the collision mesh for the vehicle hull.. which allows it to pass through anything except the terrain, given that the wheels wtill have collision.
but I need then to collide with statics as normal..
not sure if this could be done using col01 and col02 meshes principle for soldiers vs vehicles..
Any ideas appreciated.
no collision for vehicles on vehicles..
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: no collision for vehicles on vehicles..
What you can try is setting the vehicle type to aircraft for all the vehicles. They would then use COL01 meshes for colliding with each other. I think they still use COL02 when colliding with statics (however they will use COL01 from the statics to determine how far into the statics they can go)
So in theory you can have the cars COL01 mesh be non-existent while having a COL02 mesh for terrain/static collisions.
Or if that doesn't work, leave the vehicle type alone and instead create a really tiny triangle (a single polygon face basically) as the COL02 mesh and set it high enough above the vehicle that it won't interfere with collisions with most things. The COL01 should make it collide with with statics and terrain. The COL02 mesh is used for vehicle on vehicle collisions (not involving aircraft, the game treats those differently) so having little to no COL02 mesh should allow the vehicles to pass through each other while the COL01 mesh will allow them to collide with terrain. I don't know what mesh vehicle use when they are interacting with statics though.
Also note this will cause projectiles to no longer direct hit any of the vehicles. Doesn't sound like your mod uses projectiles by the style you're going for anyway, so hopefully that won't be an issue.
So in theory you can have the cars COL01 mesh be non-existent while having a COL02 mesh for terrain/static collisions.
Or if that doesn't work, leave the vehicle type alone and instead create a really tiny triangle (a single polygon face basically) as the COL02 mesh and set it high enough above the vehicle that it won't interfere with collisions with most things. The COL01 should make it collide with with statics and terrain. The COL02 mesh is used for vehicle on vehicle collisions (not involving aircraft, the game treats those differently) so having little to no COL02 mesh should allow the vehicles to pass through each other while the COL01 mesh will allow them to collide with terrain. I don't know what mesh vehicle use when they are interacting with statics though.
Also note this will cause projectiles to no longer direct hit any of the vehicles. Doesn't sound like your mod uses projectiles by the style you're going for anyway, so hopefully that won't be an issue.



I have cameras in your head!
Re: no collision for vehicles on vehicles..
thanks man, tried both of these but in vain..
for the aircraft type change im just changing this right?
I tried each and a bit of a combination of each too! but either passes through everything (except terrain.. but only beacuse of wheel collision) or passes through nothing.
are you more certain on one of these methods?
changing type to:
appeared to have no different effect on collision over the car setup above..
for the aircraft type change im just changing this right?
Code: Select all
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleType VTScoutCar
are you more certain on one of these methods?
changing type to:
Code: Select all
ObjectTemplate.setVehicleCategory VCAir
ObjectTemplate.setVehicleType VTDiveBomber
Re: no collision for vehicles on vehicles..
I don't think it is possible unless the game engine is modified.
*sadface*
DICE ... whyyyy? You pain me.
*sadface*
DICE ... whyyyy? You pain me.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
- Apache Thunder
- Posts: 1213
- Joined: Mon Oct 19, 2009 2:48 am
- Location: Levelland Texas, USA
- Contact:
Re: no collision for vehicles on vehicles..
Yeah. May not be possible with BF42. I do recall BF2 had a more advanced collision group coding and ability for things to penetrate specific materials. But that's BF2... 




I have cameras in your head!
if you make a vehicle with a new material and skip to define that material in materialManagerSettings.con to certain other materials then they shouldn´t be able to interact with eachother.
atleast it works like that with projectiles.
Code: Select all
MaterialManager.attGroup
MaterialManager.defGroup