3
$\begingroup$

In the game engine, my object needs to point at a target. How can I get it to aim at something that is constantly moving in unpredictable patterns? The constraints actuator does not have a "track to" that I can see however the 'track to' is exactly the effect I want. I'm using v. 2.71.

$\endgroup$
6
$\begingroup$

Ok. got i figured out. i just needed to use the "edit object" actuator and change it to track.


I was trying to create a gun that aimed at a moving object, which, in my case was cross-hairs that moved with my mouse. The problem I encountered was that when I added a 'Track To' object constraint to my gun, it would work in object or edit mode. However, when the game went into run-time, the object would stay immobile rather than tracking to my cursor as it had before.

The solution was removing the object constraint under the properties panel, and adding an 'Edit Object' actuator to the gun, changing the type to 'Track To'and selecting the cross-hairs as the target object.

Afterword, enabling '3D' tracking allowed my weapon to follow the cursor even above the 2-dimensional plane it was on.

$\endgroup$
  • 2
    $\begingroup$ Is there a way to get constraints in general to work, because now I can't get IK's to move. track-to isn't bone singular, it moves the whole armature. $\endgroup$ – Scalia Oct 18 '14 at 15:41
  • $\begingroup$ @RadishoftheOpera you dope! use an armature actuator. $\endgroup$ – Scalia Aug 4 '15 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.