Search found 8 matches

by jlongstreet
Wed Aug 31, 2011 4:41 pm
Forum: Questions and Help
Topic: Keep track of current colliding objects
Replies: 3
Views: 3818

Re: Keep track of current colliding objects

If I'm not mistaken, doesn't the Collidable.Pairs list contain all pairs that are in the NarrowPhase, meaning that they don't necessarily have any contacts? I'm definitely seeing collidables with pairs in their Pairs list that have no contacts. What I need is a collection of pairs that have contacts...
by jlongstreet
Tue Aug 30, 2011 4:55 pm
Forum: Questions and Help
Topic: Keep track of current colliding objects
Replies: 3
Views: 3818

Keep track of current colliding objects

We currently keep track of the actors currently colliding with each actor. The way we do this is by adding the CollidablePairHandler passed to the InitialCollisionDetected delegate to a list stored on the actor, and removing it in the CollisionEnded delegate. This seems to be unsafe, and I probably ...
by jlongstreet
Tue Aug 02, 2011 4:45 pm
Forum: Questions and Help
Topic: CollisionRuleCalculator
Replies: 2
Views: 2481

Re: CollisionRuleCalculator

There's nothing in the engine specifically geared towards supporting that, but the CollisionRules class can be extended. Including some data reference in a subclass would provide the necessary information to the delegate with some casting. This makes sense, and seems to work perfectly. Thanks! At a...
by jlongstreet
Tue Aug 02, 2011 12:28 am
Forum: Questions and Help
Topic: CollisionRuleCalculator
Replies: 2
Views: 2481

CollisionRuleCalculator

I'm trying to implement a different collision-filtering system with these basic features: 1) CollisionGroups and CollisionMasks -- A and B only generate a broadphase pair if (A.Group & B.Mask && B.Group & A.Mask). 2) Per-actor ignore collision lists -- A and B only generate a broadph...
by jlongstreet
Mon Jul 04, 2011 10:36 pm
Forum: Questions and Help
Topic: Collision with non-contiguous static meshes
Replies: 6
Views: 5394

Re: Collision with non-contiguous static meshes

The most robust method is to make it a compound shape. A compound collidable's children can have different collision rules, so the bottom detector's collision rules can be set to NoSolver. The EntityConstructionDemo in the BEPUphysicsDemos projects shows a variety of related setups. I've thought ab...
by jlongstreet
Mon Jul 04, 2011 9:55 pm
Forum: Questions and Help
Topic: Collision with non-contiguous static meshes
Replies: 6
Views: 5394

Re: Collision with non-contiguous static meshes

For reference: The box collidable's bounding box is: boundingBox {Min:{X:5.999344 Y:-3.357386 Z:-0.435012} Max:{X:6.999356 Y:-2.357386 Z:0.564999}} Microsoft.Xna.Framework.BoundingBox The two contacts are: {Position: {X:6.505825 Y:-4.145864 Z:0.04420946} Normal: {X:0 Y:1 Z:0} Depth: 3.09532} BEPUphy...
by jlongstreet
Mon Jul 04, 2011 9:34 pm
Forum: Questions and Help
Topic: Collision with non-contiguous static meshes
Replies: 6
Views: 5394

Re: Collision with non-contiguous static meshes

I'm not sure I follow completely. What I'd expect to see in that situation is that the red box will have a pair handler with the mesh, created whenever two collidables have overlapping axis aligned bounding boxes. The blue box, being outside of the mesh's AABB, does not have a pair. But based on th...
by jlongstreet
Mon Jul 04, 2011 8:38 pm
Forum: Questions and Help
Topic: Collision with non-contiguous static meshes
Replies: 6
Views: 5394

Collision with non-contiguous static meshes

We're porting a game to XNA on Windows Phone 7, and running into some issues with collision with level geometry. It's a 2.5D platformer, and the level geometry is specified as a list of vertices/indices, which we read and create a static mesh for at runtime. The level isn't one solid body, though. T...