i am having difficulty understanding how to place camera/cameras for having a third person view setup.
currently i have a single camera running the following code
import bge from bge import render g=bge.logic scene = g.getCurrentScene() co = bge.logic.getCurrentController() o= co.owner #sensor mouse = co.sensors["Mouse"] #objects Cube= scene.objects["player"] cameraTarget= scene.objects["cameraTarget"] #####mouse movement #movSpeed = 0.3 rotSpeed = (0.005, 0.005) # mouse look x = (render.getWindowWidth() / 2 - mouse.position) y = -(render.getWindowHeight() / 2 - mouse.position) Cube.applyRotation((0 , 0, int(x) * rotSpeed), False) cameraTarget.applyRotation((int(y) * rotSpeed, 0, 0), True) render.setMousePosition(int(render.getWindowWidth() / 2), int(render.getWindowHeight() / 2))
but what this does is just help me steer my player with mouse but doesn’t follow him.
what am i doing wrong here?