Change camera angle when hitting the collider.

Hello, I need to make my camera change angle when it’s in a certain place, like Mario 3d world. Example, when I go to another obstacle, the camera distance a little and angle changes, I think I should use a collider to know when to change the camera angle. But I do not know how to do it in the Blueprint. (Do not change camera, just angle, distance) thanks for the answers!

Make an actor that has a single collision volume and a rotator and a scalar in it. Set these variables manually. Then, from the event OnBeginActorOverlap you cast to the character class and if successful you call a function in that character class called SetNewCameraAnglePos (or whatever you want) and send in the rotator and scalar you stored.

Inside the SetNewCameraAnglePos function you set the angle of the camera and the distance of the camera based on the rotator and scalar.

Alternatively you can just return a vector that acts as an offset vector that you add to the character to get the new camera location. It comes down to how you have made the character really.

HTH

Use a ‘spring arm’ component inside your character blueprint and attach the camera to it just like the one in the third person template. You don’t need to do any coding for that. Remember that the obstacles must have a collider with the camera component.

Regards.

Just using the spring arm will not solve it. He has to control the spring arm. Further, this does not really answer his question.

: O I have no idea how to design this in Blueprint

Look up a tutorial on using a SpringArm for your camera. It seems you dont know anything about this, so start with copying the tutorial and learn from it. It is the safest bet to use a spring arm. Then, when you want to rotate the orientation of the camera you update the orientation of the SpringArm instead. If you want to move the camera closer or further away you just update the LENGTH of the Spring arm. GL with learning.

The rest of the answer applies after you are able to do the above two steps. Then, when entering the volume, get the two variables that give you the rotator and distance you want and just use them with what you learned from the two steps above!