Aiming arrow
Drawing an object in 3D is not as easy as it is in 2D. In many cases, you'll have to switch to a 3D modeling program such as Blender to create your game's objects. However, in this case Godot's primitives have you covered; to make an arrow, you just need two meshes: a long, thin rectangle and a triangular prism.
Start a new scene by adding a Spatial node with a MeshInstance child. Add a new CubeMesh. Click on the Mesh property and set the Size property to (0.5, 0.2, 2). This is the body of the arrow, but it still has one problem. If you rotate the parent, the mesh rotates around its center. Instead, you need the arrow to rotate around its end, so change the Transform/Translation of MeshInstance to (0, 0, -1):
Try rotating the ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access