I have a characterBody3d with the actual model body, the aiming, and the raycasts into its own child node group.
-CharacterBody3D
–Model body node
–Aim node group
–Raycast detection node group
- CharacterBody3D for general movements.
- The model body is for model animation and code to flip the model left/right.
- The aim node includes that Big yellow arrow mesh that rotates from player position. I learn the aiming 8 directions from here:
https://godotforums.org/d/40642-gun-turret-aim-at-player-with-only-8-rotating-directions
The aiming needs a target so I use mouse position in 3d as the target (using Plane forward- facing instead of down-facing of this tutorial)
the Aim node group also has a marker3D which I shoot the bullet out of.
- The raycasts node group is also just for flipping left/right.