how do you overwrite collisions?

Nov 4, 2007 at 7:05 PM
Basically I have an arrow that i want to stick in an object. I dont really care right now what kind of object it is, grass or a brick wall the arrow should stick into them both the same. Right now I have a simple if statement testing if one object's geometry collides with the arrow position. This is probably a horrible way to do it because it only tests one object out of many, and the position of the arrow is in the middle so it rarely collides unless ....

while i was typing i kind of solved this. I just made it so the arrow and geometry of the object i was testing it to collide with did not collide. So when the middle position of the arrow goes through the object it returns true and i can just keep updating the arrow position to be the same as the object's.

Obviously this is a very crude and bug infested method.. So I dont know much but would a controller for the arrow help at all? With a controller can I make it so if an arrow collides with any geometry it will create a fixed angle joint at the vector2 of collision?

Thanks.
Coordinator
Nov 5, 2007 at 4:38 PM
I think you could use a CollisionCallback method. Use that method to determine if the arrow has collided. To get the arrow to "stick" you would need to create a revolute joint and a fixed angle joint.

-Jeff