# \[ISSUE\] 3D complex models hittest

**URL:** https://forum.castle-engine.io/t/issue-3d-complex-models-hittest/2084
**Category:** 3D
**Created:** [January 16, 2026, 8:02pm UTC](https://forum.castle-engine.io/t/issue-3d-complex-models-hittest/2084 "2026-01-16T20:02:40Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![phomm](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/phomm/32/2827_2.png) [@phomm](https://forum.castle-engine.io/u/phomm)
#### Post date: [January 16, 2026, 8:02pm UTC](https://forum.castle-engine.io/t/issue-3d-complex-models-hittest/2084/1 "2026-01-16T20:02:40Z")

</div>

Following this topic [TransformUnderMouse with Alpha pixels check for quad-based Transforms - #10 by michalis](https://forum.castle-engine.io/t/transformundermouse-with-alpha-pixels-check-for-quad-based-transforms/1494/10)

I started trying 3d models hittests.

[modelhittest.zip](https://forum.castle-engine.io/uploads/short-url/3w8Rs0btyMnhpHRyjwC2tc1GXvw.zip) (122.3 KB)

For simple models both standard TransformUnderMouse and the one I made based on the mentioned topic - work fine (once you enable precise collisions)

For complex models nothing works. I assume this is because of lots of nodes in the model (when trying to modify the “nodetree” like removing all the children from top node - hittest starts working)

So the question is, how to traverse the model, its triangles from Raycast, State of Triangle or something else, so that we are sure, that mouse is exactly hitting the pixels (and ofc skips transparent pixels) of the complex model or its sub-nodes/submeshes, and not the “space inside bounding box”.

 ![image](https://forum.castle-engine.io/uploads/default/original/2X/e/ee871a326742deb9402d75fcb3cf495a03bea477.png)

---

_[View the full topic](https://forum.castle-engine.io/t/issue-3d-complex-models-hittest/2084)._
