Pick up and swap with current weapon question

Godot Version

4.2.2

Question

I’ve got 2 scenes world, player and gun1, gun2 scenes inside the player scene as children that an switch between each other on input press.

and now I want the player’s raycast3d node to collide with gun3 scene inside the world scene on input press and switch with current selected gun with no physics or animations just instant swap with same positions and also you cannot drop guns only swap between holding and on floor.

Do I use reparent on input press?

Sounds good, you will probably also have to change position of the newly equipped weapon to Vector3.ZERO and the removed weapon to something else.

1 Like