Search found 2 matches

by Neomex
Sun May 06, 2012 11:13 am
Forum: Questions and Help
Topic: Responding to collision
Replies: 3
Views: 3160

Re: Responding to collision

Should it look like this?

Code: Select all

CollidablePairHandler a = sphere.CollisionInformation.Pairs.FirstOrDefault();
if( a.Contacts.FirstOrDefault().Contact.PenetrationDepth >= 0 )
{ }
It throws null reference exception on if statement.
by Neomex
Sat May 05, 2012 9:28 pm
Forum: Questions and Help
Topic: Responding to collision
Replies: 3
Views: 3160

Responding to collision

What is the easiest way to respond to collision between terrain and object? What exactly do I have to pass as delegate?
And is it possibile to check collisions without an event system? I hate events so much... :)