Page 1 of 1
no collision for vehicles on vehicles..
Posted: Sun Oct 02, 2011 11:36 pm
by fo0k
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.
Re: no collision for vehicles on vehicles..
Posted: Mon Oct 03, 2011 2:00 am
by Apache Thunder
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.
Re: no collision for vehicles on vehicles..
Posted: Mon Oct 03, 2011 1:18 pm
by fo0k
thanks man, tried both of these but in vain..
for the aircraft type change im just changing this right?
Code: Select all
ObjectTemplate.setVehicleCategory VCLand
ObjectTemplate.setVehicleType VTScoutCar
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:
Code: Select all
ObjectTemplate.setVehicleCategory VCAir
ObjectTemplate.setVehicleType VTDiveBomber
appeared to have no different effect on collision over the car setup above..
Re: no collision for vehicles on vehicles..
Posted: Mon Oct 03, 2011 6:34 pm
by Swaffy
I don't think it is possible unless the game engine is modified.
*sadface*
DICE ... whyyyy? You pain me.
Re: no collision for vehicles on vehicles..
Posted: Mon Oct 03, 2011 7:54 pm
by Apache Thunder
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...

Posted: Mon Oct 03, 2011 9:45 pm
by freddy
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.
Code: Select all
MaterialManager.attGroup
MaterialManager.defGroup
atleast it works like that with projectiles.