greetz members
the code below works fine in runtime but return a "value error:math domain error " on line13 in console. not really
good in python so cant figured out where to fix … pls help?
from math import degrees,acos
cont = GameLogic.getCurrentController()
own = cont.getOwner()
scn = GameLogic.getCurrentScene()
obj = scn.getObjectList()
sp = obj['OBSphere']
act = cont.actuators["act"]
vect = own.getVectTo(sp)
b = degrees(acos(vect[2][1])) this is line 13
if b < 30 :
act.object = sp
cont.activate(act)