Hi,
I am trying to use the 3rd person follow body type with CM 2.6.3, but the physics collision is flaky and the camera jumps between the default distance and the collision-avoiding position. It seems the collision is either calculated/applied too early or too late.
Basically when the character with the target GameObject is facing away from a collider but is close to it:
- When moving forward (away from the collider), the 3rd person follow vcam mostly avoids the collision as expected, staying as close as possible to its target distance but still closer due to the obstacle. Sometimes though the camera briefly jumps through the collider like if it was not there, for a frame or so.
- When moving backward (toward the collider), the camera almost always act like if the collider didn’t exist. As soon as the player stops moving, the collider is taken into account again and the camera jumps forward to avoid penetrating it.
I’d have uploaded a very clear video of the issue, but the 1.3MB MP4 is refused as unsupported extension, and the 71.2 MB GIF refused as file too large.
Expected result at rest:
Penetration while moving backward
Actual camera distance when not colliding + collider shown
VCam settings
The CameraFollow game object is rooted at the player’s game object and positioned around the neck, same as the sample project from this YouTube video :
However the sample project doesn’t use the camera obstacles so the issue is not visible with it. I tried activating it, but can’t repro the bug there. The only difference I see is that the custom player controller applies its motion in OnAnimatorMove() (and therefore before Physics update) instead of Update() like in my project.
This is a bit disappointing because I didn’t change any setting and out of the box nothing works. First I had bug with the camera jumping back and forth randomly, which was “fixed” by setting Ignore Tag (although I see no reason why the camera, 2.5m behind the player, would be any bothered by the capsule collider of the player). And then once that was fixed I hit this issue in a pretty basic situation (player close to collider facing away from it) which results in sudden camera jumps and a terrible user experience. Also the 3rd person follow body type is not referenced anywhere in the documentation for 2.6.3, only found via the search function, which makes finding any information about the settings pretty difficult.
Any idea what is going on here? The main camera and vcam are both free objects at the root of the scene hierarchy, not controlled by any script (except the CM Brain on the main camera).
Thanks