Cinematic Camera on Foot
-
@LeeC2202 Don't worry these things happen. and Rappo knows better.
-
@LeeC2202 no worries man, script works great! however, would there be a way to remove the need for the player to be in stealth mode, and locked onto the target? takedowns/stealth kills can happen ingame regardless of whether you're locked on or not and it feels like i miss out on a lot of cool camera cuts because of how specific the prompt for it to happen is (locking on and crouching in stealth mode)
just my report back, awesome job regardless man
-
@Zippo-Raid The problem is, if you're not in stealth mode, it isn't classed as a stealth kill or takedown. There's a specific native that lets me test for that very situation and that's what triggers the whole camera system. The game will actually play the same preset animations at other times, but they don't register to the game as stealth kills or takedowns. I have a logging system that wrote stats about what was being flagged by the system when you attack and those two conditions were essential factors.
If you haven't locked on to a target, it is almost impossible to work out if you're actually attacking anyone, especially in a crowd. Locking on let's me identify the target and as such, be able to point the camera at them... which I have to do for the camera effects to work... they seem to need a physical target rather than just a point in space to look at for them to work.
It's basically what you showed me in that Manhunt video, where you have to target a victim, get within range and then perform a specific attack. Except in this you don't always have to attack from behind.
-
oh damn.. didn't know it was like that ;p no worries man script is still amazing thanks again for the release !
-
Just to update this thread with some thoughts I had last night.... It occurred to me why R* didn't allow the cinematic camera when you are on foot and it's something I am going to have to overcome if this mod has any chance of reaching its full potential. To explain...
When you are driving a car, you are applying a force to the vehicle that moves it in the direction it is heading, regardless of the camera direction... so it will go straight until you turn the steering. When you are walking on foot, you are always walking forward, relative to the camera direction. So when you place a camera off to one side, looking at the player, forward is now in a different direction to what it was previously.
I have some ideas on how to solve this but it's suddenly a lot more complex than I first though. The first way would be to change the control system when you are in cinematic mode, to make controlling the player like a car. So pressing forward would move you in the direction you are facing and left and right would rotate the player onto a new heading. The other way would be to try and compensate for the angle of the camera somehow and then to try and modify the input values to correct them for that angle.
I'm going to have to try both, to see which one feels more natural but either way might require a bit of a compromise on what you can do while the cinematic camera is active. I will update the thread as I do further testing...
-
@Zippo-Raid As I have discovered more and more about the targeting system etc... and more in general about GTAV modding, I have now got this to a state where the need for a target lock is now not required (but is still recommended).
I'm not happy with a couple of things that have come from this though, so it still needs further refinement. The first is the fact that crowds of people, or slight movements in the controller, can confuse this detection system. The game seems to have fixed steps that you can rotate to and trying to detect an accurate Ped in front of you can be really flaky. At the very last moment, a slight shift in rotation can leave the camera pointing at one Ped, while you attack another. The melee combat system can result in some less than obvious choices sometimes... so my detection needs some tweaking.
The second thing is it now makes the camera too frequent... for me anyway. It's taken it from being a special occasion camera and turned it into an always there camera, so I think it now requires options to isolate which events it triggers for. It's a bit like having your favourite cake for every meal.
One thing I am becoming more and more sure of though, is the fact that the full on-foot cinematic experience just might not happen. I think the switch of control types it would require would be jarring and confusing and would immediately break when you pressed the shoot button... that bit is disappointing.
-
@LeeC2202 I was playing 1.2 last night with a buncha my dirty normie console buds, we all thought it was great! I know what you mean though, about cake for every meal. However, the only thing that threw us off was the length of which it would stay in a cinematic camera angle for. It was one or two seconds too long. I haven't played 1.3 yet as my new motherboard is giving me issues and I have to reformat with an older one today, but the pacing from 1.2 wasn't hard to work with at all; hell, when Franklin would move out of frame for a moment it was really cool, like someone was really sitting there trying to film this huge group-fight for Worldstar or something. But like I said, he'd stay out of frame for a second or two too long, and when it would resume the normal gameplay camera I noticed sometimes the player would have accidentally ran into a nearby wall. Easily fixed with an ini setting for time length per cut or enough playtesting to tune it maybe, if I were you I'd cut it short by 2 seconds to start and see how that flows.
A full fledged driving-style cinematic camera for on-foot would never be possible, but don't let that dissuade your work in the slightest. What you have already in my opinion is better than trying to make the entire game look like it's filmed as a movie. Honestly, a full fledged one would be hard to work with, like you said with different control styles and such; that's all unnecessary. If you continued adding event-based camera cuts in-between the normal gameplay camera that would be the cinematic aspect of it already without any of the headache. I think I know of a couple dotnet Game.Player.Character prompts off my head it could be added to already, like for when the player is entering/exiting a vehicle or climbing an obstacle. Just small cuts here and there go a long way, just like the melee ones you have now.
Regardless, once again thank you for the well-documented and fast progress. I wish you the best of luck with further development and of course I'm looking forward to whatever's next!
-
Someone made it go look for it I saw it
-
@Zippo-Raid The duration of the camera is active for 2500 milliseconds, which is 2.5 seconds. However, you have made me realise where I do have a problem. As I slowed the speed down, I noticed that it seemed longer and I have just realised why.
When the camera is triggered, it subtracts the elapsedGameTime * timescale from a timer.. which is wrong, it should just be elapsedGameTime. I was under the impression that the elapsedGameTime was adjusted by the TimeScale factor but it looks like it isn't... It's all about understanding how the system works. The problem I have, is that different attacks take a different length of time. Punch in the face = quick, Axe in the head, foot to the chest and push off = longer. If I can find a native that lets me identify the actual weapon, I can build a table of values that are the perfect length.
I've also now disabled the controls while it is active, to stop the problem of running into bad places out of view. Those other events are worth looking into though, so thanks for the suggestion.
As you can see from my comments, I have come into this with a lot of presumptions, about what is possible that through encouragement and investigation, I am gradually overcoming. So I would like to offer my thanks for keeping the thoughts coming... I live alone and have zero human contact on a daily basis, so I have no other input apart from what I get on here. All of it, is very much appreciated.
I used to work as a games developer (for close to 30 years) so was used to always being in a team, that's not the case any more so this stuff is hard work.
-
@Bjh1986Ohio Someone made what? Can you show us what you mean please?
-
@LeeC2202 the cinematic camera on foot
-
@Bjh1986Ohio I can't find it, can you get a link to it please, I'd like to see how it has been done?
If there is already something that does what I am dong, then I am wasting my time. The only information I can find when I search for it though, is my mod and this thread.
-
@LeeC2202 gta5mods.com/On-footCinematicCam
-
@Bjh1986Ohio You do realize that LeeC2202 (the person who you're talking to on the forums) made the mod that you linked? Lol
-
@Bjh1986Ohio Ermmm, that's mine.
-
@LeeC2202 my bad