Emitter rotation
by Derek Kittrell · in Torque Game Builder · 03/01/2005 (9:39 pm) · 3 replies
Hmm.. Is there an emitter flag to keep the rotation of the emitter in sync with the rotation of the object it is mounted to? I was doing this manually using setAngularVelocity to rotate both, but they get out of sync. It seems to work okay using setAutoRotation on each object, but not for angularvelocity. Also, doing it manually seems kind of brute force. Any help would be greatly appreciated.
About the author
#2
03/01/2005 (10:42 pm)
Yes, trackrotation does the trick.. Heh.. I read about that and figured that couldn't be my problem because it defaults to true, but I snagged the code for attaching thrusters from the demo, which sets it to false.. Hah! my "duh" moment of the evening.. Thanks for your help!
#3
Thanks for helping each other out. I'm just trying to keep up!
- Melv.
03/02/2005 (1:27 am)
@Derek: Yes, that's it. There are a number of options (that'll get more loving doco attention soon) in the emitters themselves. You can tell the emitter to track the parents rotation (effect) and emit appropriately as well as having the parents position and rotation move all the particles after they've been emitted.Thanks for helping each other out. I'm just trying to keep up!
- Melv.
Torque Owner Jason McIntosh
Also, did you set the "trackRotation" parameter to "true" in the mount() call? (Eh, the docs are a little fuzzy, but maybe this isn't the problem.)