<div dir="auto">Works great, thanks for the workaround.  I will try to test in other browsers.</div><div dir="auto"><br></div><div dir="auto">John <br><div class="gmail_quote gmail_quote_container" dir="auto"><div dir="ltr" class="gmail_attr">On Thu, Jul 17, 2025 at 4:40 AM Michalis Kamburelis <<a href="mailto:michalis.kambi@gmail.com">michalis.kambi@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">> I'm not sure why mouse clicking on text didn't work in Castle Model Viewer, there aren't any Script tags.  Weird, surely enough.  Do you have feedback, Michalis?<br>
<br>
Thanks for the report. Hm, investigating, it's because the<br>
TouchSensors (like <TouchSensor DEF='Stand_Touch'...>) are inside a<br>
collision node that disables collisions:<br>
<br>
    <Collision DEF='HUD' enabled='false'><br>
<br>
( Link to exact line in GitHub soruces:<br>
<a href="https://github.com/coderextreme/X3DJSONLD/blob/841aff1527a4ade2dbafe302b43e37bc0a59e4ac/src/main/data/AllenDutton.x3d#L319" rel="noreferrer" target="_blank">https://github.com/coderextreme/X3DJSONLD/blob/841aff1527a4ade2dbafe302b43e37bc0a59e4ac/src/main/data/AllenDutton.x3d#L319</a><br>
)<br>
<br>
Changing this to say<br>
<br>
    <Collision DEF='HUD' enabled='true'><br>
<br>
makes it work in Castle Model Viewer, i.e. the clicks on Stand / Run /<br>
Walk/ Jump text are then detected and fire the appropriate animations<br>
correctly.<br>
<br>
This is a bug in our Castle Model Viewer, to be clear:<br>
<br>
- Spec says that "Collision.enabled" should affect collisions with<br>
avatar (i.e. camera), but in Castle Game Engine / Castle Model Viewer<br>
we actually use it to mean more (if something has disabled collisions,<br>
we don't build spatial structure for it, and so even mouse clicks on<br>
it will not be detected).<br>
<br>
- And, as John reports, every other X3D browser does it differently.<br>
<br>
- So, it's our bug, though admittedly it's not something I see an easy fix for.<br>
<br>
     Internal background and reasons: I'm reluctant to complicate our<br>
collision handling to account for this, as we already are in a<br>
transition from "own octrees" -> physics engine (Kraft, and future<br>
PhysX), some gory details on<br>
<a href="https://castle-engine.io/roadmap#_more_physics" rel="noreferrer" target="_blank">https://castle-engine.io/roadmap#_more_physics</a> . So we already have<br>
somewhat complicated code around this, and cleaning it up is on the<br>
roadmap but it will take some time (like, hopefully I can do this by<br>
the end of 2025; it's not something I can fix e.g. right this week :)<br>
). So, hopefully this should be fixed in the future, but not<br>
immediately.<br>
<br>
Hm, I'm sorry, I don't have a good answer to this now. It's our bug,<br>
but I don't think I can solve it easily. The easiest workaround for<br>
now is to toggle this "Collision.enabled" to true, if you don't really<br>
care if camera collides with it or not.<br>
<br>
Regards,<br>
Michalis<br>
</blockquote></div></div>