Allow certain vehicles to pass through a collision mesh?

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

Allow certain vehicles to pass through a collision mesh?

Post by fo0k »

Possble to create an invisible wall to prevent a car passing through but not obstruct a helicopter? (clearly I know I can make an invisible wall.. but needs duel functionality! :))

csm.. as usual.. would it (if possible) have to be mod specific though?
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Allow certain vehicles to pass through a collision mesh?

Post by Apache Thunder »

Specify a near blank COL01 mesh? Aircraft use COL01 for collision (except in the case of projectiles) so have a normal COL02 to block cars/soldiers and have a mesh that is just a simple plane that is moved under ground or otherwise out of the way so helos can go through it.
ImageImageImage
I have cameras in your head!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

shouldnt it work by just not define any collision damage at all between the materials the wall and the chopper is using?

in theory they cant interact with eachother at all using this technique

edit:

Code: Select all

c_CGLandscape
http://mdt.bfoutlaws.com/scripting/Obje ... p.html.htm
User avatar
Apache Thunder
Posts: 1213
Joined: Mon Oct 19, 2009 2:48 am
Location: Levelland Texas, USA
Contact:

Re: Allow certain vehicles to pass through a collision mesh?

Post by Apache Thunder »

MDT got the description on the landscape group wrong. As it turns out all it does is make objects no longer collide with the terrain. They still collide with everything else. Just makes them pass through water/terrain.

I have accidentally made an undefined mat ID once or twice on a PCO once, I don't ever recall it effecting it's collision with other things. This mainly just effected how projectiles behave when they hit an undefined mat ID.

The only way you can make something not interact with anything but the terrain is to use the obstacle class. But the trouble with that is, it won't work for what you want to do. It would end up allowing all PCOs to pass through.

You can also give a object mesh the mat ID for water. odd things occur when a vehicle collides with it. They almost pass through. But not quite. They take heavy damage though from the slightest touch. As for soldiers, they collide with it fine. But if there is a mesh surface they walk on that uses the water matID they will find them selves unable to jump.

Starting in BF2, giving a mesh a water mat ID would just trigger soldiers to swim through it and it behaves more like water since vehicles would then pass through in a manner similer to how they behave when they hit water. (the swimming pools are the best example me thinks)
ImageImageImage
I have cameras in your head!
User avatar
fo0k
Posts: 1434
Joined: Fri Oct 16, 2009 4:21 pm
Location: UK

Re: Allow certain vehicles to pass through a collision mesh?

Post by fo0k »

But.. COL02 obstructs anything and all.. and COL01 obstructs just vehicles.. is my understanding from using them?
So Im not sure how that helps me?
what do you mean by 'near blank'?

Thx!
freddy
Posts: 1267
Joined: Sun Oct 18, 2009 4:58 pm

Post by freddy »

well.. how about just turning off the hasCollisionPhysics on the chopper?

Code: Select all

ObjectTemplate.hasCollisionPhysics 0
http://mdt.bfoutlaws.com/scripting/Obje ... s.html.htm
Post Reply