What is the best way to implement an RTS camera?

Hi!

I’m trying to implement a Camera for a RTS game using blueprint as my logic programming tool.

I’ve implemented a blueprint Actor called RTS_Camera which is used as my principal pawn. In its components I have a capsule, a SpringArm and a Camera. Implemented movement using the arrows and turn, look up and zoom functionality with the mouse, also made it to shot a ray every tick from the pawn to get the first object it touch to make the camera follow the mesh of the floor, but having problems when trying to ignore other objects that are not the floor.

What would be the best way to implement a RTS camera that follows the floor mesh but ignores other objects in my map?

Thanks in advance

I’m actually working on something similar. This worked for me. In the Defaults of your RTS_Camera, change these settings.

  • Set Collision for all components to Custom preset. Check all Ingore boxes
  • In the Character Movement, set Gravity Scale to 0, Air Control to 1, Falling Lateral Friction to ~ 5 or whatever works best for you, set Land Movement Mode to Falling

Hopefully this helps!