Clicking on the spawner doesn't always work

I came across this issue today: Clicking on spawner not reliably spawning units with selection box

It was actually after a different video but I couldn’t find the solution anywhere until I came here and got auto-suggested to check that one out.

Deleting the graphics raycaster worked for me, but I don’t know why that’s the solution here. I don’t understand what was going on that made removing the raycaster fix everything up.

If anyone has an idea about it I’d love to hear it :slight_smile:

1 Like

Hey Dave,
When there is a graphics raycaster on the selection box, it causes the mouse clicks to be detected by the selection box and block the clicks to the unit spawner.

In the case of this course, the selection box is being formed anytime the mouse is clicked while moving, even if it’s too small to see. So sometimes you may click on the unit spawner, and sometimes you may click on the selection box, making unit spawning unreliable.

It also might be that the child cube on the spawner has a collider on it that’s blocking the parent’s collider.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms