# Rotating emitter direction whilst maintaining particle velocity

 0 I have a ship that rotates and moves along its z axis with an ellipsoid emitter attached as a child. The emitter rotates as the ship does, and spews out particles along its Local Axis z value, when the ship is stationary, however when the ship is in motion the particles follow the ship's velocity vector (ie local z) rather than its current rotation about the y axis. This leads to the ship facing in one direction and its particle stream following its movement along another instead. I find this odd, since the emitter's z axis must be rotating about y to match that of the ship when the ship is still. So, why is it doing this, and how can I make my emitter's local z axis (or whatever it uses for the Local Velocity z axis value) match that of the ship's at all times? Thanks. more ▼ asked Jun 02 '10 at 12:43 AM Cap 311 ● 8 ● 9 ● 18 add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

 0 The best way is to make the particle emitter a child of the ship, so then it will follow constantly and alway be in the correct position. You should also set the emitter to simulate in world space so that when the space ship turns the particles far from the ship don't turn with the ship. There is a section in the 3D Platforming Tutorial on how to set this kind of system properly if you're interested in more details. It's in the first half of the tutorial, so shouldn't be difficult to find, just look for the section on setting up Lerpz's jetpack. more ▼ answered Jun 02 '10 at 01:05 AM Murcho 2.7k ● 12 ● 23 ● 53 Yes, I've already done both those things and it isn't working. It's obviously following the z axis of the ship since adding transform.rotation.z=transform.parent.rotation.z has no effect and the particles follow the correct line when the ship rotates and is still, but the movement seems to somehow break it (also breaks with the above code attached). Jun 02 '10 at 02:04 AM Cap Addendum: I see what the problem is now, it's related to the other problem I'm having: http://answers.unity3d.com/questions/11433/problem-matching-particle-object-velocities-speedThe particles are, in fact, facing in the correct direction but they're still inheriting the forward velocity of the ship as they emit. I'll mark this as solved, despite it depending on a fix for the other problem. Jun 02 '10 at 02:12 AM Cap add new comment (comments are locked) 10|3000 characters needed characters left ▼ Viewable by all users

By Email:

Topics:

x2161
x318
x318

asked: Jun 02 '10 at 12:43 AM

Seen: 2563 times

Last Updated: Jun 02 '10 at 12:43 AM