- Home /
How to send collision points to the physics engine?
I'm not too familiar with Unity (loads of Java experience, trying Unity) but I'm wondering if it's possible to somehow send collision points to the physics engine. My goal is to make a pixel perfect collision system for a 2D game with pixel art in it. I know about the Polygon Collider 2D, but I think it's not good for the goal I'm seeking as I'm also planning to add pixel perfect destruction.
What I would exactly want to do is to add trigger box colliders for the sprites so that Unity can tell me when they roughly collide. Then I check for collisions on the pixel level with a custom code. Then I would like to somehow send these collision points to the physics engine so that it could handle the resulting movement of the sprites.
Is this even possible? To use custom collision detection and Unity physics at the same time? I did a lot of research but found no clues.
Answer by Loius · May 20, 2014 at 04:35 PM
No. You can't tell physics that something collided. There's nothing preventing you from just calling your target function though.
Answer by Sisso · May 20, 2014 at 04:42 PM
If you really want it I think better to use directly a external music library. Like Ode: