Page 1 of 1

Convert a Prefab into a detector volume?

Posted: Tue Aug 02, 2011 1:06 am
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.

Re: Convert a Prefab into a detector volume?

Posted: Tue Aug 02, 2011 1:10 am
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! :)

Re: Convert a Prefab into a detector volume?

Posted: Tue Aug 02, 2011 10:21 am
by cjhazard
Excellent! That sounds like exactly what I need.

Thank you! :)