Easy Red 2

Easy Red 2

Not enough ratings
Creating viewports for vehicles
By Miralyn
If you'd watched Marco's SDK guide on tank creation already, you probably had noticed that there was an area that wasn't covered by the guide. That is, how exactly to make the first person camera view similar to other in-game closed up vehicles. If you've been wondering about this like I did, then welcome aboard.
   
Award
Favorite
Favorited
Unfavorite
Requirements
  • You had watched at least some official ER2 SDK tutorials and have a rough understanding of how to work with the SDK and a 3D modelling software of your choice.
  • That's probably it.
What you probably came here for
Suppose that you have a vehicle already prepared (I'll use a modified Example Tank template).

First of all, add the object that you want to serve as an interior for your camera view (I'll use the driver's vision port from Battlefield V as an example) and put it somewhere where you want it to be located when in first person view. (I will intetionally put it outside of the vehicle to show you that it doesn't matter where exactly it is located).


Select this interior object, press Add Component and enter Veh View Port. Add this component to your future observation device.


Here we have two settings to adjust. The first one, the Cam Pos, as you can guess by its name, is responsible for the camera position in the first person perspective. You can of course just slap in the position of the vision port by just dran-n-dropping it into the Cam Pos field if you are really confident that its pivot point is where exactly you want the camera to be in, but I would really suggest to add an Empty on its position instead in order to manually control the camera position if you do end up messing up like it usually happens when you mod any game.


The Cam Shift on Rotate option is also not something particularly complicated. Have you noticed an effect on some in-game vehicles (especially prominent on seats with the "window" like visor like machinegunner or driver seats) where the camera shifts around the center instead of being fixed in one place? That's the setting that is responsible for it. If you want to disable it (if you want to make a periscope, for example), just set it to 0. Otherwise, just play around with it until you'll feel like its okay, or just leave the default 0.1 value.

When you are done setting up the vehicle view port, select the root object of your vehicle (Example Tank Vehicle (with Visor view) in my case) and go to the Seats section. In the section related to the required Seat (the driver seat aka Seat1 in my case), either drag-n-drop your newly created view port into the Vision Port section or just select it from the list. Here you can also tweak just how much movement in the Y axis do you want to allow. Once again, play around with this setting until it feels just right.


Publish the vehicle like usual and go to the firing range for testing purposes.

As you can see, the object we selected to be a viewport for our driver seat is not visible from the outside.

On the other hand, once you enter the seat, the camera moves to the position you selected and starts displaying that aforementioned object.

That's pretty much it. Hope it helped.
P.S. If your vehicle does happen to have interior modelled
Honestly, nothing is stopping you from just utilizing what you have. In this case, just add an Empty instead of the mesh and put it somewhere where you want your camera to be. Since it's not connected to the pivot point of some vague 3D model, you can actually just reuse it as a Camera Position object as well and move it around as you wish. Other than that, it shouldn't be anything too different from what was described earlier.
3 Comments
Chronological_Gamer Sep 19, 2023 @ 5:20am 
That great news, cause I have found a .FBX model for the Matilda Mk.II so if there any private way you or I could contact each another that would be great!
Miralyn  [author] Sep 19, 2023 @ 1:36am 
Same formats that Marco had shown, so FBX for any model that goes into SDK
Chronological_Gamer Sep 18, 2023 @ 9:52am 
Hey man do you use any particular format for you tanks? (like for example 4d)

And also, do you know which formats are compatible with Easy Red 2?