How can I make the RTS Camera collide only with the Landscape and not with other objects?

Good time of day, everyone!

Please advise me! There is a Landscape with collision, where the object type is set to WorldStatic, and this type cannot be changed. And there’s an RTS Camera that serves as a Pawn. I need the RTS Camera to only collide with the Landscape and nothing else (i.e., not collide with, for example, buildings in the game that are also WorldStatic). I can’t change the object type to my custom one, otherwise the Paint in Foliage Mode won’t work. Camera movement is done using the AddActorWorldOffset function. Everything is written in C++ without using Blueprints.

What can be done?

You could create a custom trace channel or object channel in the editor for your camera and have it ignore all other items except World Static. This would allow it to pass through everything else. And you can reference it in C++ as well.

ECC_GameTraceChannel1 - 13 is what you would reference. to find out which one you would need to use you have to setup the custom trace channel in the editor then inside of your DefaultEngine.ini you can search for ECC_GameTraceChannel and it will show you which one is associated with your new custom trace channel as seen here:

+DefaultChannelResponses=(Channel=ECC_GameTraceChannel3,DefaultResponse=ECR_Ignore,bTraceType=False,bStaticObject=False,Name="Flythrough Camera")

This one shows that my custom created Flythrough Camera trace channel is ECC_GameTraceChannel3

In C++ for example you would use it like this

SetCollisionResponseToChannel (ECC_GameTraceChannel3, ECR_Overlap);