hi everybody,
i have a problem with the camera. the problem comes up when
-
i “rotate view” with the middle mouse click in the 3d view(by the way in 2.45 it was not the case, theres all fine)
-
i wanna make a mouselook for an egoshooter
to easily reproduce the problem hold middleclick in 3dwindow and make circles on the screen
to see the difference try this in 2.46 and in 2.45
The problem is like that
when i move the camera on one axis everything is fine, but when another axis comes on the camera rotates wildly around and you cant get the view back to a straight horizon, its a bit different to discribe
the two axis’ seem to influence each others axis-directions
here are the scripts i found and used for this
horizontal mouse movement
from GameLogic import *
from Rasterizer import *
Cont = getCurrentController()
Own = Cont.getOwner()
Sens = Cont.getSensors()
Sensor = Sens[0]
Height = getWindowHeight()/2
Width = getWindowWidth()/2
#aktuelle mausposition holen
Xpos = Sensor.getXPosition()
#actuator holen
linksrechts = Cont.getActuator(‘linksrechts’)
#mausposition relativ zur bildschirmmitte messen
XDiff = Xpos - Width
#den actuator einstellen
linksrechts.setDRot(0,0,(XDiff/Own.move),1)
#und einmal kurz aktivieren
addActiveActuator(linksrechts,1)
addActiveActuator(linksrechts,0)
#dann die maus wieder in die bildschirmmitte setzen
setMousePosition(Width,Height)
vertical mouse movement
from GameLogic import *
from Rasterizer import *
Cont = getCurrentController()
Own = Cont.getOwner()
Sens = Cont.getSensors()
Sensor = Sens[0]
Height = getWindowHeight()/2
Width = getWindowWidth()/2
Ypos = Sensor.getYPosition()
hochrunter = Cont.getActuator(‘hochrunter’)
YDiff = Ypos - Height
hochrunter.setDRot((YDiff/Own.move),0,0,1)
addActiveActuator(hochrunter,1)
addActiveActuator(hochrunter,0)
setMousePosition(Width,Height)
i would really presciate when you could tell me where the worm is in.