0
votes

I developed a cocos3d application, and I have several Node in my scene.

The size of my nodes is small (10px max.). So, it is very difficult to detect a key pressed on the nodes when the camera is too far.

Can we enlarge the detection area on a node?

Thank you in advance!

1

1 Answers

1
votes

Try using CC3TouchBox. This is an invisible box node that you can add as a child of the smaller node you want to make touchable. See the class notes of the CC3TouchBox class for more info.

If a box shape doesn’t suit your needs, you can use any node shape, such as a sphere, or even a copy of your primary node, as a child of your primary node. The key is to set the visible property to NO, and the shouldAllowTouchableWhenInvisible property to YES.

…Bill