I need to constrain an object using the axis of another object (my problem is related to the axis direction: there is no "distance between objects" constraint; you have to use the local or global axis to check). So, I made this parented object that tracks the whole time to another one, and from it I want the Y axis.
Using this tutorial for reference, I did the following:
#CONSTRAINT
direction = cont.actuators['Direction'] #the constraint actuator
face = sce.objects['Facer'] #the facing object
faco = face.localOrientation[1] #here we are (this gives me a 3x3 matrix)
#but i only want to use the Y value
#I’ve tried out even 0, and 2 but wont work
def constra():
direction.direction = faco #this isn't running as it should
cont.activate(direction)
There are no errors in the terminal. It's just not doing what it should do. I think I'm wrong, and he didn't want the orientation of the object, but some other stuff maybe...