I’m working on a game that needs to have a throwable camera that the character can throw at walls to get view of what is behind the corners. I’m wondering how can I make sure the camera always point at the right side and look away from the solid wall?
The wall is throughout the entire level and can’t have custom sockets to hold the throwable camera.
So, it sounds like on ball/camera collision with the wall, you would want to get the normal vector to the wall as the default camera angle. (that is facing directly off the wall) you could then customize that angle to get a more desired result.
I would make a projectile class and on collision with the wall, spawn a class (“ball camera”) which of course would have a camera component and probably be a pawn if you want the player to control it. The location of spawn would be the hit location and the rotation of the spawn would be the rotation of the x vector of the normal vector. To get the rotation correct, try dragging off a wire from the “Normal” vector off the of the broken hit result and the type “get rotation from x vector” and let that be the initial rotation of of the spawned camera.