[SOLVED] Invisible hitbox

Hi i need an invisible hitbox for my RAY/raycast , any one has some ideas?
I need nothing complicated just a flat cube would go, but invisible

Set the cullhint to frontandback?

you need invisible hitbox or hitbox with invisible model?

dont remember now, did cull made raycast hitbox not visible too?

i think it will still be visible as hitbox, right?

as i know it check first bounding, so detach model from node(that would update bounding to 0) would do the work.

Also, you do raycast on some Node, so this special nodes can be on some “noRaycastNode” while other would be in “raycastNode”.

just 2 solutions like above if cullhint will not work.

“if you need just invisible hitbox without any model”

you could just create a Box and like jayfella said make its cullhint param to Always.

it will then just not render Box, but raycast should be visible.

I may be wrong, but i believe cullhint is just a hint for the GPU, whereas a raycast will use the scenegraph and ignore cullhints.

1 Like

yep i think the same, so we should be right :slight_smile:

i were just not sure if “invisible hitbox for my RAY/raycast” he mean invisible just for rayCast or invisible for view.

In this community, we do a lot of extra work to answer poorly asked questions… but sometimes you can only answer what was actually asked.

So yeah… in that case, collideWith() ignores the JME cull hint… so you don’t even have to mess with the material. Just set the Spatial’s CullHint to Always. = invisible hit box

1 Like

Thanks every one for answers

1 Like