How can I display a different tool mesh in 1st person mode? 3D layers?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By DrPlamsa
:warning: Old Version Published before Godot 3 was released.

In first person mode, I want a tool to be visible as though the player is holding it as in first-person shooters or Minecraft. However I want this to be a different mesh than another person would see the player holding. Howe can I do this?

Can I use layers, like in 2D? Is there a similar thing for 3D?

You can toggle the visibility of meshes when you “switch” the camera from FPV to other perspectives/players.

Aside from this I only know of the Range Begin/End Values in Meshes which auto toggle visibility dependent on the distance to the camera (usually used for LOD).

wombatstampede | 2017-12-08 11:25

Maybe you can make it so your mesh is always drawn on top, I remember there is a way to do it with materials but I don’t know which setting it is

Zylann | 2017-12-10 02:09

:bust_in_silhouette: Reply From: Zylann

In Godot 3.0 there is a hack to draw first-person meshes, which is to have the model next to your camera and check no depth test in its material. This will draw the mesh on top of everything else, however it’s limited to a single mesh.
In 3.1 there is a plan to add render layers, so you could render anything in a separate layer to have it on top (from Reduz on IRC).

For other players, if your game is multiplayer I guess you can simply not instance the same one, since you certainly know which player is you and which player is not you.