I heard that the gun you see the player holding in the game is not actually there, it is just an optical illusion. Can someone tell me if this is true and if so, show me how this is done on a multiplayer game.
Well, technically speaking, nothing in a video game are actually there as they’re all virtual objects…
I’m not quite sure what you’re asking, to be honest?
More commonly the gun that you see YOURSELF holding in a first person shooter game is not the same geometry that is shown to other players in the game when they look at you.
That means what is viewed by you is a super-detailed often artificially foreshortened model of the gun, and what all the other players see is the full gun, and obviously your full body too, the arms holding it, etc.
That’s probably what whoever told you that means. Otherwise yeah, like @BlackPete said, video games are all optical illusions. I like to think of video games more as Potemkin Villages myself, especially the environments.
Speaking of illusions, remember how the original Doom tricked us into thinking it was 3D with 2D sprites?
But as others have said, I’d make 2 models: 1 for the player to see and another for others to see. That’s also why you can’t see your feet or torso in many FPS titles.
Depends on your detail you’re going for. Do you want a Call of Duty quality gun in your hands you see in first person? It is unnecessary to show that same level of quality for a gun you see held by another player, so you’d show a high detail model and hands for yourself only. If you’re going for a minecraft quality graphics though then you’d probably just do a close up of the same blocky gun everyone else sees.
Do you have a way that shows how to set that up?
You’re going to have to be really specific about what you want otherwise people can’t help you, I had asked for instance about Fallout 4 weapon switching and animations awhile back, because I had noticed that when changing weapons and so on or reloading in third and first person the movements etc. were entirely different.
It turned out the way to mess with this was layer masks and so on, I also looked at Call of Duty and how to do those icon pop ups and so on, it’s all just a scaling effect and transparency trickery, everything is already there in the scene but hidden in the actual game and it just pops up at the right time values are added giving you the optical illusion you’ve unlocked something new in the game.
I think these two videos are exactly what you’re looking for so in this second tutorial what you would do is use the techniques he describes to make an entirely separate layer for your players to see through their cameras and another separate layer that contains all your first person stuff.
Hope that made sense.