I think someone already considered that. So far, my best bet is that the parenting code isn't deep within the bowels of some DLL hell, so I can modify it directly. Source uses angles stored in a 3-tuple as (pitch, yaw, roll). I can try to set it so that it doesn't update only the second angle of the child if the child is in the turret of a vehicle to disable the rotation on the Z axis, or possibly update the only the third angle so that it the player will rotate with the vehicle going up a slope. The issue is that I can't *just* disable angle updates, because that would mean disabling roll. If I disable roll, then if a vehicle does something like drive perpendicular to the gradient of a slop, the player will still be straight vertical relative to flat ground, which will cause the player to clip into the vehicle and look weird as shit, and also defeat the point because they'd be shooting into the vehicle.
Only removing the Z-Axis rotation should be enough I think. And flasche, the goal never was to keep the player aimed at exactly the same target as before. Of course aiming from a moving vehicle is harder. It's rather to just remove the absolute impossibility to aim, when the vehicle turret moves with FPS speeds.
Perhaps the laziest way would be to do a trace from player POV until it hits something and save the position in a vector, and then reorient player angles towards that position?
exactly my point, actually i think there is no way around raytracing since depth matters and not the difference between gunner and driver. only trap there is (candles point), is that the players z axis doesnt have to be aligned to the world z axis (if a vehicles goes up a slope) - so if you just reorient the player you might end up tilted. if you just substract z rotation of the turret so the globaly z rotation of the player stays the same you have the picture above. well yes i rotated for 90° but the slightes move of the turret will bring you off target. if the driver is looking around you wont be able to aim at all either. i think in reallife its mostly just working like that, its easily archievable by mechanical parts alone so cheap and durable, but in reallife you also have a whole lot more information available from acceleration to account for that, plus you may have dampeners and stabilizers.
My concern with your ray tracing method is just this: Ray tracing becomes pretty expensive at some point. And the second one is that it can feel pretty damn weird. You are basically moving the player's FOV on your own. I think you can compensate translation a lot easier than rotation. And don't forget this: It is not SUPPOSED to be easy to fire from a moving/rotating vehicle. I mean what you are trying to implement here is pretty much a minor aim bot. And I honestly don't want to make it that easy for a player. A third thing that can play into this is that the vehicle turrets should move slower anyway in my opinion.
Gren+mortar is all you need in second seat. Though I can understand trying to make it so other classes can do something. I do agree with firewarrior, it shouldn't be easy to aim in the passenger seat. Maybe not as hard as it can be now, but not like you're floating in air able to take pot shots at people.
yes at some point everything becomes expensive is this point reached with a maximum of 64 rays more? which you probably never reach anyway, yet ofc it should work at this scale so anything else is unimportant really ... ... idk. but i dont believe either. youd need to account for everyone to fire at the same time so you should be able to cast 64 rays - if raycasting itself is so superexpensive then store hit locations, you eventually need them for a lot of stuff anyway. if you cant have the 64 rays then you cant have 64 players. but yes, maybe its best to leave it unperfect. passenger seats might become an issue ...
Let me also just raise the following questions: How do you separate normal rotation of the turret from the movement of the vehicle itself? I mean you probably don't get that info easily when you only have the player's FOV. When do you actually stop moving the player with the code? I mean you could just move the vehicle and it would still fix the FOV of the player. How often do you update the whole thing and how do you make it work well with the player's own movements?
If you can't disable the yaw updates, couldn't you track the delta yaw of the turret and apply the opposite to the player.
My god, you're right! In World of Tanks, this is what balances lighter tier tanks to heavier ones. You can run around a heavy so fast he has difficulty aiming at you. It would alleviate the problems with rails being so easy to aim in comparison to missiles, and add a whole new level of depth to tank combat. We need this!
I do agree that we need a "speed limit" for the turret. However I do not agree that it should be "realistically slow". It can kill a little fun and I don't think there's much upside. This has a bonus of solving 2 exploits too.
Realistic turret turn speed would be infuriating to say the least, but limiting to something like Planetside 2 has (or faster iunno) would be huuuuge.
is a decoupled crosshair an option? one where you aim and one for the barrel aim. but even if not, totally pro for trying it out.
I am voting for a decoupled cross hair, if it's possible. I am not saying that you should slow it down to KV-2 levels. Just don't make it directly dependent on your mouse flying across your mouse pad! <.<
Just make the passenger be bound to the position, not rotation of the turret, or to a dummy bone at the turret. This is good and useful. It's not realistic, but removes a lot of frustration.
You could attach him to the non-spinning chassis instead of the spinning turret, but then that requires the turret's hole to be perfectly lined up with the point where the turret attaches to the chassis - the rotation point. If it's not that way, then the passenger well just clip through the turret when the turret spins. And unfortunately some turrets have offset hatches, so this would be an issue. I need to do a mockup picture of the issue because this idea keeps coming up.
let me help you with my pasts self awesome paint skills also lets not get lost in stuff which would be cool but requires a lot of effort - i thought its about lowering turret rotation speeds as another option of balancing? i think its impact on balance is way higher and has a lot of potential to make empires a better game (and probably also downsides we wont know before trying out) then 2nd seats (which have the potential to buff brenodi considerably, especially if ducking into the turret gets implemented aswell - its under consideration)
Lol, thanks. I meant actually configuring it that way in-game for a screen cap. I'll do it next weekend or something.
can you do that just by scripts or have you leveled up to coder? it actually shouldnt be all that hard to make it work. you only need to cast a ray after the player moved his mouse and realign him after you applied the turret rotation. but really, i think slow turrets with a detached aim system should have a lot more - and if it works out also a lot more positive - impact on the game and so would, in my opinion, be a better time investment. ofc i dont mean to tell anyone what to do and useable 2nd seats would certainly be cool aswell.