[Guide] Third Person Camera

TPS Camera for Custom Battles

I have replaced the FPS cam with a modified TPS camera.
Also has crosshair so you can actually hit enemies.

You can use the below sample to get started:

Sample mission:
OmerInverseTPS.zip (18.8 KB)

Same mission on the sandbox portal:
https://sandbox.enlisted.net/post/K2NmNNkYUE1fn9PB/

Video with TPS in action:



If you wish to edit the camera position (relative to the soldier’s head afaik) you need to edit tpscam.blk inside the cameras folder. Editing base_shooter_cam yields no changes, the camera specified in shooter_cam__blk:t="CAMERAPATH" needs to be edited instead.

If you want to edit the default camera (when you are not zooming in, looking down sights) edit zoomedOut offset:

zoomedOut{
  atPos:r=0.0
  pivotPos:p3=0.35, 0.2, 0.07
  offset:p3=0.37, 0.0, -0.66
  fov:r=90.0
  velTau:r=0.12
  velFactor:r=0.1
  tau:r=0.2
  tmToAnimRatio:r=0.7
  animTau:r=0.8
}


If you want to zoom into first person mode while aiming down sights, change this:

zoomedIn{
  atPos:r=1.0
  offset:p3=0.37, 0.0, -0.66
  fov:r=90.0
  velTau:r=0.0
  velFactor:r=0.0
  tau:r=0.0
}

to this:

zoomedIn{
  atPos:r=1.0
  offset:p3=0.0, 0.0, 0.0
  fov:r=90.0
  velTau:r=0.0
  velFactor:r=0.0
  tau:r=0.0
}

(offset is 0,0,0)


Note that changes to zoomedIn are only visible online, for some reason, in the editor, changing the zoomedIn in any way doesn’t show up. This is not true for zoomedOut.

It’s not perfect. Issues are:

  • TPS also is applied when driving wheeled/regular vehicles like APCs, Trucks etc. Most of the time it works fine, but it has no constraints, so it can clip into the vehicle.
  • You cannot use sniper rifles’s scopes.
  • Crosshair is broken when running/sprinting.
  • While can be enabled for tanks, the inner modules become visible, and TPS would need to be modded for every single tank seperately. (I have not looked into this much)
More

I also tried to enable the trajectory when throwing grenades, but they don’t seem to be working, even when enabled. But the entites for them still exist. I mean this:

Enlisted Battle of Berlin _ Enlisted Pre-Alpha Gameplay (720p_30fps_H264-192kbit_AAC)_2

10 Likes

@Bazsi37 I have copied your whole code (with your name credited on top of the code don’t worry) to my zombies map. I think it will be the first ever zombie map in enlisted to have 3rd person camera

Great! I’ve not seen anyone use it yet.

1 Like

I will test if it works well with the game
It is a unique mechanic to play with.
Btw is it possible to make the camera more far away from the soldier?
And is it possible to just make the crosshair disappear while running

Btw is it possible to make the camera more far away from the soldier?

Yes.

kép

Edit offset position.

And is it possible to just make the crosshair disappear while running

Nope. Might be possible with entities.blk override but idk.

3 Likes

offset:p3? I tried to edit it but i didn’t see any difference
Edit: Oh wait i editted the wrong entity thats why lol

1 Like


My mod is testing. Now version 0.7
https://sandbox.enlisted.net/post/IiHaC5GuwFPjfE58/
I have changed the zoom in camera to have offset = 0, so that you can still aim correctly
The modified file here

// Third person camera by Bazsi37 @ https://forum.enlisted.net/en/t/guide-third-person-camera/134494
// tpscam.blk - editted by Gamer_Victorch on 04/06/2024
inputSpd:r=1.0

zoomedOut{
  atPos:r=0.0
  pivotPos:p3=0.35, 0.2, 0.07
  offset:p3=0.4, 0.0, -1.25
  fov:r=90.0
  velTau:r=0.12
  velFactor:r=0.1
  tau:r=0.2
  tmToAnimRatio:r=0.7
  animTau:r=0.8
}

zoomedIn{
  atPos:r=1.0
  offset:p3=0.0, 0.0, 0.0
  fov:r=80.0
  velTau:r=0.0
  velFactor:r=0.0
  tau:r=0.0
}
1 Like

i downloaded the files, put them in the scene i want, yet NO changes at all, no changes when testing, still fps cam, why??, how do i make it so it ACTUALLY work propely?

is there a way to download and install the third person camera view on my enlisted?

This is, sadly, exclusive to the mod editor. You can only add it if you make a custom mod yourself.
That means it is not a client side mod but a server side one. It would be kind of cheating if you can use third person in normal battles. It can only be added to custom game mods, like those you see on sandbox.enlisted.net

If you are interested in making mod (which is called “custom missons” by the developers) you can ask here or dm me

I also have codes of my mods public and available to anyone, no matter they are newcomers who just wanted to try the mod editor out or fellow experienced coders of this community

1 Like