Topic was automatically imported from the old Question2Answer platform.
Asked By
bborncr
According to the docs the use_collision flag “Adds a collision shape to the physics engine for our CSG shape. This will always act like a static body.”
If it acts like a static body shouldn’t there be a mouse_entered() signal in the node?
How is the collision shape accessed?
I’m trying to create a selectable object using CSGShapes.
You’ll see that they use _fixed_process (now called _physics_process) to cast out rays to the mouse position. camera.project_ray_origin(mouse_pos) does the conversion of a mouse-position to a 3d position to be used in a raycast.
You’d probably have to set a variable (mouse_pos) in the camera script which saves the last mouse position delivered to _input(event)
So raycasting detects the static body in CSGShape. Tested and it works!