def update(self):
from bge import logic as G
import math
scene = G.getCurrentScene()
own = self.own
cam = scene.active_camera
wtc = cam.world_to_camera
own['rota'] = math.degrees(cam.localOrientation.to_euler().x)
if 'init' not in own:
set = cam.projection_matrix * wtc
own['prev'] = set
own['init'] = True
self = MotionBlur
set = (cam.projection_matrix * wtc)
cameraMatrix = own['prev']
self.x = cameraMatrix
self.viewProjectionInverse = set.inverted()
own['prev'] = set
评论列表
文章目录