2022-09-06 at 2:07 pm #55614
Can I set up an object so that it is permeable for click- and hover-events, so the underlying objects get triggered?
In my use-case right now, I have an outside object, that is being clipped away by a clipping plane, so that several inner object get visible. But the when-hover or when-clicked events on these inside objects don’t work. I have to hide or delete the outside object in puzzles, then it works as expected, but that would mean I have to leave out the clipping functionality. Before I do so, any suggestion is very welcome!2022-09-06 at 2:36 pm #55615
Try to use
x-rayoption2022-09-06 at 4:16 pm #55629
You are right, I can activate the x-ray option on the inner objects events. But then, the event is triggered always. I need it to be triggered only when the inner objects are visible. The not clipped part of the outer object should block the trigger.
See the example screenshot. The event on Suzanne should only be triggers when clicking on Suzanne (gray) but it also gets fired when clicking on the golden cube in the area where Suzanne is hidden by the cube.
I understand that my question was missing this information. Just making the box permeable is not what I actually need. it needs to be permeable only where it is clipped away. Could that work somehow?
Attachments:You must be logged in to view attached files.2022-09-06 at 4:26 pm #55631
raycastpuzzle2022-09-06 at 9:10 pm #55637
Thanks again for the good idea, but unfortunately the golden cube gets always hit by the ray, no matter if it is clipped away or not. So I cannot use the intersections array to determine if the cube is visually covering Suzanne or not.
Or am I missing something here?2022-09-08 at 9:38 pm #55677
Are these conclusions right for now?
1. Hover- and click-events can not be triggered (on the visible parts only) on objects which are wrapped by an other object, even if that wrapping object is clipped away by a clipping plane.
2. Raycast always intersects a given object, even if it is clipped by a clipping plane.
Thanks for any confirmation or contradiction!
- This reply was modified 2 months, 2 weeks ago by Pascal. Reason: clarify (on the visible parts only)
Attachments:You must be logged in to view attached files.2022-09-08 at 9:48 pm #55679
I think, a clipping plane just makes a part of an object transparent.2022-09-08 at 10:04 pm #55681
I see. And transparent parts are also hit by raycasts, because the geometry is still there, its just transparent.
I will change the plan of my app and find an other solution for the functionality we had on our mind.
Thank you for your feedback!
- You must be logged in to reply to this topic.