How do fps games mantain the same fov on the weapon but change it in the environment? Do they use two cameras, and if so, dosnt this screw up the effects coming out in the front of the weapon because of different fov?per example one camera with 60fov and the weaopn one with 30 all the time, its screwing my effects coming out of the barrel (per example a trail from the barrel to an enemy)Thanks! I've been wraping my head around this
>>515822>mantain the same fov on the weaponit's clearly different, the effect is less pronounced because it's closer to the camera.
>>515822its a pretty good subject though. what degree of FOV is best for fps games ? MW3 in particular is a pretty good example.
You have a camera/layer that only renders the gun so you can maintain same FOV on the gun if you want and it prevents the gun from clipping through the world geometry since its on its own rendering layer.
Yeah guys, sorry the pic isnt exactly the problem.Yeah >>515825 thats the part I get, but the effects are screw up, because the effect is rendered in the world camera, so when you have different fov on the weapon camera the effect is not coming out from the barrel (and even if you adjust the position to "fake it") if you change the fov of the world camera, everything is different again.The effect/particles part is where im lost :( thanks!
>>515827they render the particle in the same render layer as the gunduh
>>515828You cant because in the example im using ( a trail from the barrel of the weaopn to the enemy ) if you have different fov you are not gonna get to the same point, and if you should maybe im doing something wrong.
>>515829I dont exactly know what you mean but bullets in games dont come out exactly where the barrel is on screen in first person view, which can create problems/misses when shooting at someone from very up close.
>>515830Image a laser from the weapon to a random player. thanks for reading.I have 2 cases, World fov at 60, weapon fov at 30, effect on world layer or effect on weapon layer. the image is has the effect on world
>>515831this is the other one, world 60 weapon 30 effect on weapon
and this is the scene
>>515830Bullets in games are fired from the middle of your screen, the gun just gets a particle effect.
>>515822this pic is retarded as shitfov isn't resolution based at all, you won't get a different view at the same fov with different resolutions, the devs are lying to you. or probably the pic, looking at how the bottom pics were taken with a wider ratio and just marked with green lineshttp://www.opengl-tutorial.org/beginners-tutorials/tutorial-3-matrices/for reference
>>515831>>515832Pls just do a raycast from the middle of the screen.
>>515835Ignore the first pic please, just updated with 3 new ones with my example on top, thats the problem im having, thanks, will take a look at the link tho.
>>515836Raycast from the middle of the scren, why? I still want the effect to come out of the weapon to the middle of the screen yeah, I dont have problem hitting the target, I have problems with the effect coming from the barrel, theres a discontinuity if you render the effect on world.I dont know if theres something to fix this or.. thanks!
>>515838oh, ok, looks like rotating it on the vertical axis will fix the issue?
>>515838I haven't done this myself, but from playing any fps what I gathered is there is a vector from the playerview to a distant point somewhere and all bullets/laser/weapons align with it, I'm not sure of fov will change that. Maybe render it without multiplying it to the fov?
>>515841No because if you change the world fov (from 60 to 100 per example) the character goes away but the effect stays the same, The effect should be on the world camera (The first example)What are are doing right now is moving the Z of the effect start position but I dont quite like it.. because it has some cons..
>>515842Sorry I dont think I fully understand what you are saying, the problem is the start of the effect (where it is missaligned with the weapon, like the first example) the end of the effect is perfect.Thank you so much for taking your time.
>>515844you should've posted an animation, cause I can't understand the problem properly.
>>515845I'll try to explain a bit better, cant do a video rn.I have two cameras, one rendering the world with 60 fov and another one rendering the weapon with 30 fov, But I want a "Laser" effect coming from the barrel of the weapon to an enemy on the screen (see screen 1 on my other posts), since the fovs are different, if you place the starting point of the effect in the barrel of the weapon in the scene ( see the scene screen ) in the game view theres a distance between the weapon and the start of the effect (because the weapon is on 30fov) so thats my problem, I need to effect to start from the barrel of the weapon in the game viewthe world fov is configurable but not the weapon one, thats why just faking the effect is not really the solution.Thanks for helping.
>>515834The games that actually do this are fucking garbage.
>>515846>I have two cameras, one rendering the world with 60 fov and another one rendering the weapon with 30 fov,You're continuing to think of rendering as happening with "cameras" and not "matrices". If you want to change the FOV you change the Projection Matrix.>But I want a "Laser" effect coming from the barrel of the weapon to an enemy on the screen (see screen 1 on my other posts), since the fovs are different, if you place the starting point of the effect in the barrel of the weapon in the scene ( see the scene screen ) in the game view theres a distance between the weapon and the start of the effect (because the weapon is on 30fov) so thats my problem, I need to effect to start from the barrel of the weapon in the game viewYou do your physics calculations / collision in World Space without any camera or viewing component even being a factor...I repeat...FOV is not a factor in collision / physics, its not even in the equation....look at any physics / collision system for confirmation...
>>516095>The games that actually do this are fucking garbage.Almost every game does this center cam raycast. Even many 3rd person ones, often allowing you to fire from 100% cover.But yeah it's objectively shit if you as a player is aware of what's going on and exploit it. Or play against people who understands what's going on and exploit it. For the casual clueless pleb that equates to ~95% of players it actually enhances their experience since they don't have to deal with barrel alignment.Playtesting with proper gun/ray geometry they be all like "I can see that guy behind the pillar but I cant shoot him, that's BULLSHIT!11".Or in 1st person they aim down sights over a ledge and fail to realize the barrel is lower than the sights so the shot at concrete and becomes pissed.
>>516097>I repeat...FOV is not a factor in collision / physics, its not even in the equation....look at any physics / collision system for confirmation...Just set it up yourself and see what happens, it's clear you're capable of understanding this stuff but don't have a clear understanding of the problem. You can't superimpose a FOV X image ontop of a FOV Y image and expect parallel lines to end up in the same place of your visual field.
they can keep the fov on the weapon because it's not the real weapon other players see. the player mostly can't see it's own weapon and just sees arms with a weapon only he or she can see himself on a layer not effected by the fov
>>515822yeah, the weapons are drawn as a different scene overlay, with their own FOV and camera.
>>516098Tom Clancy's The Division has proper gun barrel alignment and people don't seem to be bitching about it too much. Then again, The Division has a proper cover system.
>>515833why do you shoot his ass in the first place