Hatred
Hatred 1.333 - a FPS / TPS / VR mod
Mikey 30 Oct, 2024 @ 11:34am
How did you change the camera to first person in gameplay?
I got the editor installed and I'm wondering how you got the camera to change perspectives? I don't know jack about how it works so I'm just fiddling around for now. I'm assuming something about the CameraActors?

Asking cause I want to make a true FPS mode with custom viewmodels and animations, thanks. And if I get something working I'd be down to add it to this
Last edited by Mikey; 30 Oct, 2024 @ 1:00pm
< >
Showing 1-7 of 7 comments
Igoreso  [developer] 4 Nov, 2024 @ 12:36pm 
Sorry did not notice this topic earlier.
Short answer is that changing the camera is relatively simple but not trivial.
I'll post something later this week, I'd have to restore my editor (again), and prepare a bunch of screenshots.
Igoreso  [developer] 4 Nov, 2024 @ 9:13pm 
Actually you know what, I lied, it is not simple. It would be easier to prepare a sample blueprint that you can then use. Give me some time.
Igoreso  [developer] 4 Nov, 2024 @ 11:15pm 
Ok, here it is:
https://drive.google.com/file/d/1fEXPRtc_Bj51h2J6EBKZIIKTwV-FngMb/view?usp=sharing

Close the editor and unzip the archive into:
Steam\steamapps\common\HatredEditor\Hatred
Then start the editor and edit your map to use MyCharacterFpsSample as a character.
This blueprint (BP) is your starting point - it has only bare minimum to make it "playable".

Mesh component references MainHero_AnimFps ("anim BP"). This, alongside entire Custom\Perspectives\FirstPerson folder is optional - you can edit the mesh component to use the stock anim BP - but it provides some animation basics like vertical aiming and adjusted movement speeds.

Let me know if there are any compilation errors as I might have forgot to include something. Feel free to modify those files as I created character BP from scratch, and anim BP is a copy with small changes.

Don't feel pressured in any way, I don't expect anything out of this. You can as well give up at any point. Just have fun. But if you manage to have any good progress - let me know early, so we can figure out how to properly cooperate on this (I'm assuming you've read this part of FAQ).

"Pro"-tip: right-click on any asset in the editor's content browser and use "reference viewer" to better understand how assets use each other. You can extend "search breadth limit" up to 50 in the top-left corner.
Last edited by Igoreso; 5 Nov, 2024 @ 2:58pm
Mikey 6 Nov, 2024 @ 11:42pm 
appreciate the response. I can animate ♥♥♥♥ in blender its transferring/exporting to the engine and being usable yknow
Igoreso  [developer] 7 Nov, 2024 @ 12:26am 
I won't be able to help with either but feel free to ask me questions about BP code. Although I imagine you won't need it much.
Igoreso  [developer] 7 Nov, 2024 @ 2:31am 
Up to you but to save time, you could first try using some free models / anims to see if you can make it work at all. The trick here is that the game uses UE 4.10.2 and most of the stuff online is for 5.0+. Here is what I was able to find:

https://www.unrealengine.com/marketplace/en-US/product/fps-animation-pack
https://unrealall.com/file/ak-47-fpsk-ready

In either case, my honest advice is to take it slow. Don't set yourself a crazy goal. Just do the first thing that you can play around with. Sometimes even finding the relevant file in the editor is already a progress. FPS mod started from a single node in BP code where I've attached the camera to the head, and that worked only for executions. I've only made it this far by doing the smallest possible thing each time, and having fun with it.

Good luck.
Igoreso  [developer] 9 Nov, 2024 @ 1:19am 
I was thinking about the implementation, and I have an idea how can this be implemented. But first a little background about anims in UE and specifically Hatred.

Anim blueprint (MainHero_AnimFps in our case) defines behavior for stuff that is continuous - i.e. walking speed and direction, plus aiming angles. This is best suited for "idle" anims such as walking (gentle sway of the weapon), running, and looking around (mostly to rotate it when looking up/down), plus it can be used to choose between regular idle and "aiming down sights". I've tried to mimic the ADS by simply cutting an idle anim down to a single frame and moving the camera with BP code.

Next part are "action" anims - shooting, reloading and holstering / swapping. These exist in pairs: one anim for the player, another for the gun itself. For example AK47 shooting anim defines how the bolt inside the gun moves, while player's anim defines the recoil / kickback. The gun is attached to the hands so recoil movement is only really needed for the player but not for the gun.

To implement FPS anims you can add a new mesh component to the character BP and hide stock meshes (player + gun; they would still be animated and we'll use that). This mesh would have its own anim BP that would define continuous stuff. I think there is no need to bother about looking up/down, as entire mesh can be rotated instead, but still need anims for movement (standing, walking, running, crouching).

For actions, existing stock anims would have to be edited inside the editor to add custom events that would then trigger custom anims on the new mesh. For example: recoil anim on stock player mesh would trigger "shot" anim on new mesh; holster anim will trigger holster anim as well as change the component's mesh to another one. I'm already doing this trick in the recoil anim to do some magic, so it is easy.

Let me know if anything is unclear.
Last edited by Igoreso; 10 Nov, 2024 @ 12:56am
< >
Showing 1-7 of 7 comments
Per page: 1530 50