When my camera collides with my wall, after I move the camera back to where it isn't colliding with anything, the camera stays fixed very closely to the player. What can I add to the code below to fix that(or fix it with the blender logic bricks)?
from bge import logic
def collision(cont):
own = cont.owner
scene = logic.getCurrentScene()
target = scene.objects['playerOne']
ray = cont.sensors['Ray']
if ray.positive:
own.worldPosition = ray.hitPosition