How can I capture a mouse position on an invisible plane without a collider?

I want an invisible plane collider to capture mouse clicks but I dont want objects to collide and bounce off the plane. If I take off the collider, then the mouse script doesnt work. Can I make a plane with physics material that does not effect other objects? Thanks

1 Answer

1

If other objects have a rigidbody, they will bounce off it. (Only one of the objects needs to have the rigidbody for the collision to occur.) So I don't think Joel's answer will work.

What you should do is check the "IsTrigger" box in the collider object. This will ensure objects simply pass through it instead of colliding with it.

I forgot that triggers could respond to raycasts!

Great, that works. I almost had to use math! Thank guys.