Game Development Community

Particle inherited rotation

by Jake Seigel · in Torque Game Builder · 03/08/2008 (6:07 pm) · 1 replies

Ugh, I really apologize if this has been answered in the past; I read a similar post but it didn't seem helpful. I'm trying to have an effect inherit the rotation of its mount. I'm using a dynamically created particle effect but it shouldn't matter.

I had "Attach Position" checked off in the effect and it worked to copy the rotation, but then it forced all particles to keep the same position (go figure eh?). It just seems like the only way i can get the proper rotation inherited... Any ideas?

#1
03/08/2008 (6:25 pm)
Answered my own post; well a fix for it anyway.

I was using the faceMouse behaviour for the object the effect was mounted to. So i added a function to that object's class for setting the rotation. In that function, i did the following:

%this.setRotation( %degrees );
%this.effect.getEmitterObject(0).setFixedAngleOffset(-%degrees);

I know it's a bit of a hack, but it works :)