|
I'm making a game that looks like a football game. In my game is a special combo that you're kicking the ball very fast and I created an effect for that. It looks like an explosion in forward direction. The problem is that when I am spinning my character to the right or the left and do the combo - the effect is "exploding" toward the same direction always. Just like it keeps exploding on the z axis even if my character is turned to another way. How I make it "explode" to the direction my character face? Another question: I want to use the particles on one part of my character and the enemy to show on which team he belongs to. When I put the particles on one of the meshes, the particles doesn't show up and I get that error !IsFinite(outDistanceForSort). It is a character I created in blender. How can I make the particles show?
(comments are locked)
|
|
Hi Michael. It seems you have either of two cases as to why your particles travel into world-z.
The particles are animating in local coordinates and I created it as 2 diffrent prefabs, one for charging the energy and the other for the explotion, The prefabs shows up one after the other only when I click a button. Both prefabs have the problem. How can i set the rotation?
Mar 16 '11 at 02:39 PM
Michael 16
You can set the prefabs forward vector the same as your targets forward vector. For instance, if you are creating a prefab and you have a direction the ball is going to be shot in, you can set your clones rotation like so: effect.transform.forward = motion.normalized; Or if you want to parent something to a node you could have the node point in the proper direction and parent it such as effect.transform.parent = thatNode; effect.transform.position = Vector3.zero; effect.transform.rotation = Quaternion.identity; Or if you are doing this through the editor, just rotate it properly.
Mar 16 '11 at 03:42 PM
Statement ♦♦
If you use local coordinates in editor and have it parented to some object, then you can think of the blue axis being forward. (r/g/b color = x/y/z axis)
Mar 16 '11 at 03:43 PM
Statement ♦♦
You can also create a rotation from any directional vector using Quaternion.LookRotation http://unity3d.com/support/documentation/ScriptReference/Quaternion.LookRotation.html
Mar 16 '11 at 03:45 PM
Statement ♦♦
I can you explane more please? It's hard to me to understand what you said...
Mar 16 '11 at 05:48 PM
Michael 16
(comments are locked)
|
|
Answer to your 1st question: Disable Simulate In World Space for the Ellipsoid Particle Emitter. It doesn't works. It was diable before.
Mar 16 '11 at 02:23 PM
Michael 16
(comments are locked)
|
