Foliage collision

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Foliage collision

Post by Oceans14 »

I used the foliage editor to place trees on my map just to make life easier, but the collision doesn't work - you can walk and shoot right though them, so that's no good. Anyone have any ideas? Here's the relevant part of the prp file:
Hidden/Spoiler:
[code]Layer(0)
{
SpreadFactor(0.2);
Mesh()
{
File("hpalm_1.msh", 135);
Frequency(40);
Scale(1);
Stiffness(1.0);
//CollisionSound("foliage_collision");
}
Mesh()
{
File("hpalm_1.msh", 135);
Frequency(30);
Scale(0.7);
Stiffness(1.0);
//CollisionSound("foliage_collision");
}
}[/code]
Marth8880
Resistance Leader
Posts: 5042
Joined: Tue Feb 09, 2010 8:43 pm
Projects :: DI2 + Psychosis
Games I'm Playing :: Silent Hill 2
xbox live or psn: Marth8880
Location: Edinburgh, UK
Contact:

Re: Foliage collision

Post by Marth8880 »

There's a way to enable collision on a foliage layer, but it'll only collide with soldiers, not ordnance/vehicles/etc.

Your best bet is to place the trees manually - possibly make several meshes that consist of multiple trees grouped together much like the Endor trees.
Calrissian97
Second Lance Corporal
Second Lance Corporal
Posts: 102
Joined: Sun May 07, 2017 11:31 pm
Projects :: ANF - ISM Skin Changer - BF1 Ports
Games I'm Playing :: All teh BFs
Location: Kentucky, USA

Re: Foliage collision

Post by Calrissian97 »

I think you could also use pathing for walls/lines of trees.
User avatar
Oceans14
Command Sergeant Major
Command Sergeant Major
Posts: 296
Joined: Mon Apr 27, 2015 7:09 pm
Projects :: Athenova Campaign
Games I'm Playing :: SWBF2
Location: Planet 4546b

Re: Foliage collision

Post by Oceans14 »

But Marth I'm laaazy... lol

@calrissian97 I think you're on to something. The prp's "Treeline" parameters may be helpful if used creatively. A combination of multi-tree meshes and a path of nodes should do the trick... I'll try it out and post back here.
Post Reply