Terrain collisionrules group null in event.

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
imtrobin
Posts: 101
Joined: Thu Jun 11, 2009 3:03 am

Terrain collisionrules group null in event.

Post by imtrobin »

Reporting a bug,

I set the terrain collisionrules.group to a specific collisiongroup. In the event collision callback, the other.Entity.collisionRules.group (this is the terrain) is null.
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Terrain collisionrules group null in event.

Post by Norbo »

With which event type did it happen, and what sort of actions were being performed at the time of the error?
imtrobin
Posts: 101
Joined: Thu Jun 11, 2009 3:03 am

Re: Terrain collisionrules group null in event.

Post by imtrobin »

EventHandlerInitialCollisionDetected

I was just reading it's Entity.collisionRules.group to compare.

I setup the Terrain with a collisionRule group

Terrain terrain_;
terrain_.collisionRules.group = collisionGroup; //this s a new CollisionGroup I pass in, non null)
Space.add (terrain_);
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Terrain collisionrules group null in event.

Post by Norbo »

I am unable to replicate the error; is it rare or erratic? A repro case would help.
imtrobin
Posts: 101
Joined: Thu Jun 11, 2009 3:03 am

Re: Terrain collisionrules group null in event.

Post by imtrobin »

Ahh. I got the reason. I wasn't testing the Entity.collisionRule directly but the Entity.tag collisionRule. For the terrain, the tag is tied to a dummy Entity that has noPair.

My bad, apologies.
Post Reply