Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I'm trying to create an explosion at the point that two entities collide, but whenever explosion.Activate() is called, it causes an InvalidCastException to be thrown in Raycast(), on the line that returns the callback.

return callback(fixture, point, output.Normal, fraction);

Is this a bug in Farseer, or am I doing something wrong? It doesn't appear to be a known issue.

share|improve this question
    
Solved it, I was passing a non-integer value into UserData. The built-in explosion class relies on it being an integer. –  PartyMix Apr 21 '12 at 20:21
    
You should add that as an answer and accept it. –  Richard Marskell - Drackir Sep 11 '12 at 20:48
add comment

1 Answer

up vote 1 down vote accepted

I was passing a non-integer value into UserData. The built-in Explosion class relies on it being an integer.

share|improve this answer
    
Do not forget to accept your answer. –  Den Nov 1 '12 at 9:37
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.