Game Development Community

EZ way to link particle emission to player facing?

by GregM · in Torque Game Engine · 08/27/2005 (12:27 pm) · 1 replies

Is there an easy obvious way to link the direction of a particle stream (say from Splash emitter) to the direction a unit is facing? For example, if I want a wake trail behind a power boat to stream out behind the boat in a narrow path how do I conform it's emission direction to the opposite of the direction the boat is facing?

Currently I have very nice wake trails that always go in one direftion no matter which direction the boat is heading. Things look great as long as I head north :-)

My boats are based on player.cc not vehicle.cc. Should I add contrail emitters or jet emitters from vehicle.cc to get this working or am I missing something about the player splash emitters that would allow this?

I have texturemapped particles so not only is emission direction important but also particle orientation direction.

Thanks

#1
08/27/2005 (3:55 pm)
The best I can think of would be to get the rotation of the boat using GetForwardVector(). Then, using the flipped values of the GetForwardVector() function, change the rotation on the emitter.