i was looking for a third person that can rotate camera around player and i found this, but he don’t have a cap to stop the camera.
if you have a better third person that rotate camera around player please give .blend link
how to add a cap in this code?:
import GameLogic as g import mathutils from mathutils import Vector scene = g.getCurrentScene() co = bge.logic.getCurrentController() o= co.owner #sensor ray = co.sensors["Ray"] muro = ray.hitObject normal_vec = Vector(ray.hitNormal) Camera = scene.objects["Camera"] Empty = scene.objects["cameraTarget"] Plano = scene.objects["Plane_collision"] if ray.positive: Camera.worldPosition = ray.hitPosition Camera.localPosition.y -= 1.3 else: Camera.worldPosition = Empty.worldPosition