Hey, how do I fix it? I added sphere collision in front of the camera or something, but it didn’t work.
Should i use clipping tracing? but i don’t know what to do after the branch for the camera
Hey, how do I fix it? I added sphere collision in front of the camera or something, but it didn’t work.
Should i use clipping tracing? but i don’t know what to do after the branch for the camera
Hey there @gokword! Is your camera directly parented? You could put it on a very small (or 0) spring arm, and set up the collision like you would a third person project but tiny and it will stop the camera from being able to clip, but they’d see the back of their head. Alternatively you’d have to take trace/collision from in front of the face and stop the forward lean if collisions/trace are detected.
Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.
Hrm, I’ve done something similar before and it worked, something may have changed. Oh well, you could also have the spring/camera attached to the capsule instead but that means no leaning with the character mesh at all.
Though if you wanted to go the trace route, its going to be custom for each person since your character’s animation BP is different. If your lean forward is handled there, you’d trace and branch off depending on if it hits or not. If it doesn’t hit anything they keep leaning, otherwise the lean stops.
Then if there’s an obstacle in front of the camera, let’s stop leaning…
I made it but this time it can get into the wall, how do I prevent it?
I don’t think this tracing’s gonna work. What if we add collision to the camera, so it doesn’t hit the wall or something? Is there a solution for that? It’s a huge bug.