Shootergame - seeing both first and third person weapons in game

Hi all,

I’m moving a lot of code from shootergame into a new project and I’ve run across and issue I’m having difficulty figuring out.

Looking at shooterweapon it looks like the first and third person mesh visibility is handled by the visibility of the pawn they are attached to.

For some reason I’m always seeing the third person weapon mesh in my game. Anyone have any ideas why I might be seeing both weapon meshes when in first person view?

Thanks!

Just to provide a little more clarity :

The third person weapon mesh appears to just spawn and hang there, doesn’t rotate with my pawn or anything.

When I’m possessing my pawn, I don’t see the third person player mesh. If I unpossess my pawn, the weapon appears to suddenly snap to the socket.

If I repossess my pawn, when I aim the third person mesh aims as well.

It seems like it’s spawning but not being attached or hiding properly… Anyone have any ideas?

Whenever you’re creating a mesh, you have the option to hide it or show it from certain “people” if you will. If you own the pawn, you can hide it either from your self, or only allow your self to see it.

The first person mesh would do this using bOnlyOwnerSee = true, and the third person would use bOwnerNoSee = true. This allows other people to see the 3rd person mesh while you only see the 1st person mesh. You can find both these variables inside the Skeletal/Static Mesh component’s properties.

ShooterGame’s implementation is easy because it’s first-person only for the local player. Should you ever want to change view, it becomes increasingly difficult. In SG’s case however, it’s handled with the ‘OnlyOwnerSee’ and ‘SetOwnerNoSee’ functionality.

Thanks guys - I figured out shootergame is handling the visibility of third person / first person mesh components not in code but in the blueprints for the weapons under the rendering tab.

All straightened out now.