- Home /
How can I detect a collision point, but allow player to pass through collider.
I have a Unity project in which there is a 2D game world that consists of static circle colliders. The player is dynamic. I need collision point to check whether player's trajectory(path from which he came from) tangent to circle collider or not, so I can't use Trigger. But I also need to allow player pass through collider. I cannot use Trigger, because I need collision point. How can I solve the problem? Thanks!
Answer by Raresh · Feb 16, 2017 at 01:47 PM
You can do it with triggers, but you'd have to use some math. Because you know what you hit are circles, and maybe the radius too, you should be able to calculate whatever you need from that, and apply whatever forces or calculate if it's tangent by using the velocity of the moving object in relation to the static circle.
Your answer
Follow this Question
Related Questions
Detect a collision point, but allow pass through collider. 0 Answers
How to use Physics2D.IgnoreCollision2D in Unity 5 to cancel a trigger 0 Answers
Cirlce Colliders 0 Answers
Collision returning an error 0 Answers
Collider2D/RigidBody2D not working 1 Answer