Help! Particles!
by Andrew Son · in Torque Game Builder · 01/11/2012 (2:19 pm) · 4 replies
Hello!I'm trying to find the variable to adjust the base angle the particles shoot out from. In the editor it is referred to as the Emission Angle Base in the effect graph but I've .dump()ed my particle and don't see a member or function remotely close relating to this variable. Anyone know where I can find it or how it can be manipulated in game?
#2
01/14/2012 (8:08 am)
^^^ doesn't seem like the forums like quotes to much, but you can find this info in you documentation and on the TDN. I love the tdn because there even more hidden gems in that bad boy if you willing to dig around. I hope this helps but I'm not sure exactly what you are trying to do or why you did what you did.
#3
Also, I guess I need to check out TDN. Haven't really looked into that.
01/14/2012 (1:37 pm)
Thanks Glenn, I'll have to try this out. I'm wanting to make the base angle completely random which doesn't seem to be a feature in the editor. If there is a feature in the editor that I am missing here though please let me know. Thanks for the help!Also, I guess I need to check out TDN. Haven't really looked into that.
#4
01/14/2012 (11:04 pm)
Yeah I ran into the same issue when I first started using TGB. Only way to randomize is through hard coding.
Torque Owner Glenn Thomas
// Create a blank effect. %effect = new t2dParticleEffect() { scenegraph = mySceneGraph; }; // Load our fire-effect from disk. %effect.loadEffect( “fire.eff” ); // Find the “sparks” Emitter. %emitter = %effect.findEmitterObject( “sparks” ); // Select the “speed_life” graph-field. %emitter.selectGraph( “speed_life” ); // Clear any existing Keys. %emitter.clearDataKeys(); // Add our keys. %emitter.addDataKey( 0.0, 0 ); %emitter.addDataKey( 0.5, 5 ); %emitter.addDataKey( 0.9, 20 ); %emitter.addDataKey( 1.0, 50 );