Items flying through solid wall

Ask for help about creating mods and scripts for Grimrock 2 or share your tips, scripts, tools and assets with other modders here. Warning: forum contains spoilers!
Post Reply
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Items flying through solid wall

Post by Phitt »

I noticed that thrown items don't collide with my custom walls (which are free standing double-sided walls, like forest_ruins_wall_01 for example), they fly right through. The strange thing is that I copied the exact definition of forest_ruins_wall_01 from the asset pack and only exchanged the model. Yet items fly through my wall and collide with the forest ruins wall. Forest_ruins_wall doesn't even have a base object, it's a stand-alone definition so there is not much room for mistake.

I could add an additional projectileCollider component, but according to the definition reference walls don't need to have one (and thus the forest_ruins_wall doesn't have one either).

What am I doing wrong (I hope nothing too obvious...)? Or is this a bug?
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: Items flying through solid wall

Post by petri »

forest_ruins_wall_01 is basically a door (it has a Door component). For doors, the bounding box of the "gate" node is used as the collision shape for projectiles. I'm betting that your model does not have the node or it's bounding box is incorrect.
User avatar
Phitt
Posts: 442
Joined: Tue Aug 14, 2012 9:43 am

Re: Items flying through solid wall

Post by Phitt »

Thanks, that explains it! I always renamed a random node in the gmt to 'gate' to get rid if that error message, thought it would only matter for 'real' doors.

EDIT: And another question: I noticed that the walls I use for a tileset aren't solid and don't have an automap icon if placed separately (if I 'paint' them using the tileset brush they work fine, but not if placed as objects taken from the object list). Now this is most likely since they don't have a 'door' component by default and have no automap icon defined either. And I also guess this was done to save performance (?). Do I have to make a second entry for each wall I want to use separately (one with door component and automap icon defined)? Hope that makes sense.

EDIT2: It's probably easier to simply use an invisible fake wall with automap icon and door component for the few instances where I want to use the tileset walls separately, so nevermind.
Post Reply