Mounts and track rotation
by Kurtis Seebaldt · in Torque Game Builder · 03/14/2005 (9:17 am) · 2 replies
I'm trying to mount a particle effect on a sprite and have it rotate with the sprite. I can mount it and set the trackRotation flag to true and that works. The problem is, I need the effect rotated 90 degrees from its initial position. I noticed that if trackRotation is set to true, the mounted object no longer respects setRotation(). Is there a way to set an initial rotation offset from the parent and have trackRotation go from there?
About the author
#2
Chris is correct in that you can adjust your particle-effect but I suppose that's not good if you want the same effect mounted in different ways.
On its way. :)
- Melv.
03/14/2005 (9:55 am)
The base rotation is removed when you mount unfortunately. I could've gone either way when I wrote that code but chose to reset it, doh! I've got this feature down on the list to add. There are lots of requests coming in for the "mount()" command and its parameters are getting a little out of hand so I'll probably do it so that when you mount, the objects current rotation is used. At least that way, it's one less parameter for the command. I'll also be adding support to allow an arbitrary pivot-point when mounted as well at the same time,Chris is correct in that you can adjust your particle-effect but I suppose that's not good if you want the same effect mounted in different ways.
On its way. :)
- Melv.
Torque Owner chris
Go into the particle editor and load the effect. Now select one of the emitters from the list and choose edit. Click on the button under the text "Graph Field:" and choose "emissionangle_base".
Now select the first value (there may be only one) in the time/value list and click "edit" below this list. Edit the value to be the angle you need and click save.
If the angle looks right, click on the large "<
When that's done, choose save from the top. Enter a new name if you don't wish to save over the preset.
Finally, try it out. It might take some tweaking to get it right, and maybe there is an easier way, but this works.
Hope that helps.
Chris