I am currently trying to set up a camera which is not able to move “inside” of walls in placed buildings.
In the camera pawn blueprint, following component structure is set up:
Sphere > Spring arm > Camera
Instead of blocking the camera pawn sphere on collide, the camera just zooms in on the sphere and does not trigger an overlap or hit event. I can continue to move and rotate the sphere inside of the building mesh but cannot zoom anymore (my changes to spring arm length are done in the background but until leaving the building, the zoom stays the same).
I set up collision settings in the building class as well as in the camera pawn to block each other.
The building as well as the sphere have collision set up for the mesh.
Every object type is blocked inside of the sphere collision settings, the building has “overlap” enabled for “Visibility”.
In the spring arm, “do collision test” is enabled. If this is disabled, no unwanted zoom happens on collide, but still nothing is blocked and no overlap or hit event is triggered.
In the building and camera pawn blueprints, collision is enabled for query and physics.
In both, the meshes are used as root components.
In both, “Simulation Generates Hit Events” and “Generate Overlap Events” are ticked on for the meshes.
I tried different object types for the sphere (e.g. Pawn, WorldDynamic etc.)