obj not defined

I have a simple script that needs help,

import GameLogic
import math
import mathutils

obj[‘AngleZ’] = obj.orientation.to_euler().z

it says obj is not defined in the console

Ok fixed that, now my issue is that even though the code is working, the value is still 0

So wsad plus space are controls,

The object Text in the middle of the screen is set monitor AngelZ on object Center,

This value should be changing, when the car is steered,

thank you all for your help
:slight_smile:

Attachments

DemoHelpX2.blend (916 KB)

@BluePrintRandom:

This one comes down to bad spelling.

The only place “AngleZ” is spelled correctly is in the “Steer” text. Elsewhere it is “AngelZ”, which is a different entity altogether.

Woot.

better use worldOrientation rather than orientation. Orientation is deprecated and misleading (read and write are different)