no collision for vehicles on vehicles..

Ask questions, discuss ideas, get answers
Post Reply
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

no collision for vehicles on vehicles..

Post 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.
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: no collision for vehicles on vehicles..

Post 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.
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: no collision for vehicles on vehicles..

Post 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..
User avatar
Swaffy
Posts: 1715
Joined: Sun Aug 29, 2010 9:25 pm
Location: Cibolo, Texas

Re: no collision for vehicles on vehicles..

Post by Swaffy »

I don't think it is possible unless the game engine is modified.
*sadface*

DICE ... whyyyy? You pain me.
(Forum Thread|Download) Swaffy'sMod v0.34 | Download link to come Soon™
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: no collision for vehicles on vehicles..

Post 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... :(
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post 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.
Post Reply