Script dont working right

Hello Community,
i have a camera script …this Script works on Global Axis but i want the local Axis. I dont know how to write this script with the local axis function. Can some one helps me != sry but my english is very baaaad…i hope you understand my problem :slight_smile:

Chugy :slight_smile:

Drohne _Grundform.blend (743 KB)

This isn’t for game engine, but regular Blender. you get the idea though:

import bpy
from mathutils import Vector

ob = bpy.context.object
mat = ob.matrix_world
vec = Vector((0,0,1)) # arbitrary translation vec here
offset = mat.to_3x3().normalized() * vec

mat.translation += offset

i need the code for the game engine pls :0