"looking At" node with a camera!

Hello,
I am no programer but I’ve been working on my own “Track to” Node for a while ( which is kinda similar ).

This forum helped me to figure how to proceed but the problem I found is that the " fromEuler " function converts Quaternion from YZX Euler ( which Gimbal Lock on the Y axis) , instead of XYZ Euler ( which Gimbal Lock on the Z axis).

As a test I wanted to create my own node with the XYZ Euler to Quaternion conversion.
I based my node on the “Track to” Actuator from BGE which I’m use to.
TracktoNodeExample
Edit:
I upload the Node to whoever want to try it.

The Node definition ( it’s a python file, just remove the “.hx” extention to make it work ):
track_to_test.py.hx (1.4 KB)

The Node Itself:
TrackToTestNode.hx (6.6 KB)

There, I hope it could help somebody.
Again I’m no programmer so the code might be messy.

2 Likes