Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by FNDEBOER · Oct 11, 2017 at 05:36 PM · raycastingeventsystemculling mask

Pointer Event Data does not use the PhysicsRayCaster event mask.

I'm dealing with an isometric click-to-move game where I have multiple floors. I have colliders set up to trigger culling masks when the player moves to another floor and this works perfectly. Each roof is culled from the camera as the player moves up or down by using Layers Roof1, Roof2, etc.

I've also put an eventmask on the PhysicsRaycaster on the camera, but this shows very erratic behavior. The PointerData worldposition when I click on the ground I use to trigger an 'ongroundclick' event is often the one on the higher roof, which does not show on the current camera and is hidden from the raycaster by the mask.

Any ideas? Is the PointerData from the built-in event trigger ignoring the eventmask I set up for the PhysicsRaycaster? Could the NavMesh have something to do with it?

I've been trying to get this to work for days now, and I've tried everything. If I limit the draw distance of my camera to the exact floor height it works better, but it's still erratic. I've also tried multiple camera's, one for rendering and one for raycasting that was optimized for draw distance, but even though that works a little bit better, it's still not perfect and really slow.

Any idea what causes the pointerdata to register objects that are masked in the raycaster?

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

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by karl_jones · Jul 10, 2018 at 02:42 PM

There are many things that can be going wrong here. Do you have an example project you can share?

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 FNDEBOER · Aug 29, 2018 at 05:18 PM 0
Share

Thank you for the reply. It took me a while to set up an example project, but while I was working on that, I realised that the Nav$$anonymous$$esh is always raycasted on the Default layer no matter what you do to the objects in the scene. I stopped using the default layer in my culling system and everything works fine now.

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

76 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Making own character clickable 1 Answer

Problem with Graphic Raycast and using it with Xbox Controller 0 Answers

offset the position of a click on uGUI 0 Answers

GraphicRaycaster seems to ignore Toggle elements 1 Answer

How to offset Pointer in EventSystem Interface 0 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