Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by Twayne · Oct 06, 2010 at 12:23 PM · collidermouse

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

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Thom Denick · Oct 06, 2010 at 03:03 PM

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.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image JoelAtMoodkie · Oct 06, 2010 at 03:10 PM 0
Share

I forgot that triggers could respond to raycasts!

avatar image Twayne · Oct 06, 2010 at 03:38 PM 0
Share

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

avatar image
0

Answer by JoelAtMoodkie · Oct 06, 2010 at 12:46 PM

Other objects won't bounce off of it if it doesn't have a rigidbody attached. Removing the rigidbody should have the effect you desire.

If you must have a rigidbody, I think the following will work too:

  1. Create an empty GameObject.
  2. Add your plane collider to it.
  3. Make this new GameObject a child of your GameObject which contains the rigidbody.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Twayne · Oct 06, 2010 at 03:06 PM 0
Share

No, I took out the rigidbody before. All I have is the plane mesh and the collider and the script. If I take out the collider, the script fails. I think the answer would be a physics material that lets objects pass through.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Mouse move question 1 Answer

Internal collisions 1 Answer

how to put a collider on an object but doesnt block the mouse click on the object behind? 2 Answers

Multiple colliders using IPointerEnter/ExitHandler 1 Answer

Raycast Without Colliders 6 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges