Trail Effect Rotating The Wrong Way
by David Taylor · in Torque Game Builder · 10/17/2007 (1:37 am) · 2 replies
I'm just starting out looking at behaviours. I've got a simple tank sprite which I have given tank controls. I have mounted a very basic trail effect - the image is simply two vertical yellow lines.
When I drive the tank forward, the yellow tracks follow behind and fade away. But as soon as I turn the tank, the tracks seem to rotate in the opposite direction.
I've linked an image that contains portions of three screen captures that demonstrate what's going on here. Does anyone have any idea as to how I can get the tracks to follow where the tank's tracks have actually gone?
http://img.photobucket.com/albums/v649/jesbass/TankMovement001.jpg
When I drive the tank forward, the yellow tracks follow behind and fade away. But as soon as I turn the tank, the tracks seem to rotate in the opposite direction.
I've linked an image that contains portions of three screen captures that demonstrate what's going on here. Does anyone have any idea as to how I can get the tracks to follow where the tank's tracks have actually gone?
http://img.photobucket.com/albums/v649/jesbass/TankMovement001.jpg
About the author
#2
I had a behavior on the sceneobject to which the emitter was mounted which used onupdate to get the object's rotation and then I "think" I was using setFixedAngleOffset() on the emitter. But I never got the conversion from object rotation to angleoffset correct.
Anyway hope this gives you some ideas.
10/19/2007 (11:45 am)
I had this same problem but I don't have the code in front of me. I don't think there is a simple checkbox to do this, instead you have manually specify the rotation of the particles each tick, but the rotation of a particle is expressed in a slightly different degree system than that of a sceneobject, so there is some conversion that must be done.I had a behavior on the sceneobject to which the emitter was mounted which used onupdate to get the object's rotation and then I "think" I was using setFixedAngleOffset() on the emitter. But I never got the conversion from object rotation to angleoffset correct.
Anyway hope this gives you some ideas.
Torque Owner David Taylor