Inverse Collisions Possible?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
stuff4mike
Posts: 7
Joined: Sat Jan 07, 2012 8:25 am

Inverse Collisions Possible?

Post by stuff4mike »

Hello again,

I have a quick question. =) I have a player with a collision capsule using the character collisions example. If I have a giant cylinder, or box, is there a way to constrain that player capsule, or other objects, to be inside of that object? Instead of testing collisions for being on the outside and walking on the top, side, etc? The reason I ask is because I think it would make some of my level design simpler. I know I could use building static meshes as a collision test, but I am trying to reduce overhead and a few building styles I want to create might have more complex architecture where I want to actually constrain where the player can go, within a simpler shape, kinda early Resident Evil style I guess. =)

Thanks so much for taking the time to read this.

- Michael
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Inverse Collisions Possible?

Post by Norbo »

There is no automatic 'hollow' support, but it is possible to manually set up constraints for relatively simple objects like cylinders and boxes. It's not particularly easy though, and it will quickly scale to extreme difficulty if there is more than a single simple shape defining the 'allowed volume.'

For any nontrivial volume, it would be best to just create some simplified geometry that defines the collision volume instead.
stuff4mike
Posts: 7
Joined: Sat Jan 07, 2012 8:25 am

Re: Inverse Collisions Possible?

Post by stuff4mike »

Thanks for the quick and helpful reply, as always. =D

The simplified geometry makes a lot of sense, that pretty much clarifies the issue for me actually at the moment. =) Take care!

- Michael
Post Reply