0
$\begingroup$

I want to change the Time value for an Edit Object: 'Track to' actuator in-game. Seems like something that should be achievable with Python - but I can't find any documentation on this.

Edit Object Actuator - Track To. Change Time Value.


To add to the confusion, the documentation I could find refers to refers to this actuator as the TrackTo Actuator, although no such actuator appears in the list of actuator types:

Instead, Track To is listed as a subset of Edit Object. It is also listed this way in the documentation for the Edit Object Actuator: Track To (Although this page doesn't go into any details about Python).

This Blender Artists thread was helpful for at least getting one object to track to another, but the Time value is not mentioned. And I can't even get the tracking to update with each tick.

After reading that thread I looked to the API to try to better understand alignAxisToVect(). It takes three arguments, one being a factor of how much to align, but it seems that any updating over time would need to be programmed manually, and I'm not sure if it would look smooth.

There is an angularDamping attribute as well, which seems like it ought to do something similar to the track-to Time value. But at this point I'm speculating.

If anyone knows how to get at this Time value or emulate its functionality with Python so that it can be updated in-game, please share.

$\endgroup$
1
$\begingroup$

Try in Python:

cont.actuators["TrackToActuator"].time = any_value

Reference in API

Edit - example file by Mentalist (from link in comment):

$\endgroup$

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.