Project scenario:
UE5 characters are roaming in the scene, and can switch between first-person and third-person perspectives.
When the character is near a wall, etc., it is easy to pass through the wall or the character through the mold when switching the viewing angle. Switch between the first and third-person perspectives of
characters in the model
Cause Analysis:
The camera enters a wall or penetrates a character
solution:
1. Use the spring arm
2. Set the event where the camera collides with the character. When the character wears the model, set the character to be invisible
After the camera under the spring arm collides, the spring arm will automatically compress to avoid mold penetration.
Place Collision on the third-person camera and the character respectively, and set the character invisible after the collision.
Or directly set the collision object as a character.