How to prevent camera from clipping through floor? (UPBGE)

Vertex Parent an empty to the player: camera_hook
parent the camera to the camera_hook
write a script so the cam hook can detect if it’s near floor then stop the empty and set it’s position to nearest hit location.

got working example here:

1 Like