Convert a Prefab into a detector volume?

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
cjhazard
Posts: 35
Joined: Mon Aug 01, 2011 8:05 pm

Convert a Prefab into a detector volume?

Post by cjhazard »

Hi, I'm new to using BEPU so please excuse my noob-ness. I'm just wondering what is the simplest way to convert an already existing Prefab (such as a Box or Sphere) into a detector volume?

Also, I'd just like to thank the creator of BEPU for an excellent product! There's obviously a ton of work gone into making this and it's incredibly impressive!

Thanks.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Convert a Prefab into a detector volume?

Post by Norbo »

I'm just wondering what is the simplest way to convert an already existing Prefab (such as a Box or Sphere) into a detector volume?
If by detector volume you mean something that can detect contacts, but doesn't respond to them, then the simplest would be to set its entity.CollisionInformation.CollisionRules.Personal = CollisionRule.NoSolver. The 'NoSolver' portion means that it does everything up until the Solver, which would otherwise compute collision response forces. The contacts are still present for game logic to analyze.

More information about collision rules can be found here: http://bepuphysics.codeplex.com/wikipag ... umentation
Also, I'd just like to thank the creator of BEPU for an excellent product! There's obviously a ton of work gone into making this and it's incredibly impressive!
Thanks! :)
cjhazard
Posts: 35
Joined: Mon Aug 01, 2011 8:05 pm

Re: Convert a Prefab into a detector volume?

Post by cjhazard »

Excellent! That sounds like exactly what I need.

Thank you! :)
Post Reply