I have an issue with measuring the angle of an object.
In the enclosed example-blend I have a script to determine the objects angle.
The problem with it, is that the angle only goes from 0 - 180 and then counts down again.
I would need the angle to be 0 at start and then count up. so after half rotation it should be 180, whole rotation 360, two rotations 720 etc.
I’ve tried different scripts from the forum but none was working properly. The one I am using is the closest I could find.
import math
import GameLogic as logic
from math import sqrt
import mathutils as mt
cont = logic.getCurrentController()
board = cont.owner
#Your orientation
angVel = board.getAngularVelocity(False)
board["angle"] = board["angle"] + angVel.z
#print(board.worldOrientation.to_euler())
This should do some, but unfortunately it doesn’t support decimals (I was wrong), so you need to rotate the object fast in order to add the rotation value