• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by Michael 16 · Mar 16, 2011 at 01:42 PM · errorparticlesexplosionz-axis

How can I make particles respect the rotation of objects, and fix error "!IsFinite(outDistanceForSort)"

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 w$$anonymous$$ch 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?

Comment
Statement

People who like this

1 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Statement · Mar 16, 2011 at 01:50 PM

Hi Michael. It seems you have either of two cases as to why your particles travel into world-z.

  • The first case is if you have animated your particles in world coordinates, then they will not respect the orientation of your object. You should animate your particles in local coordinates.

  • The second case is if you have animated your particles in local coordinates, you may be placing your object without any rotation. T$$anonymous$$s can happen by mistake if you are creating the particle as a prefab, and position it somewhere and forget to set its rotation. However if you have it parented to some object (as your character), then it is much more likely that you would be in the first case - where you animate the particles for world coordinates rather than local.

Comment
Joshua

People who like this

1 Show 8 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Michael 16 · Mar 16, 2011 at 02:39 PM 0
Share

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?

avatar image Statement · Mar 16, 2011 at 03:42 PM 0
Share

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.

avatar image Statement · Mar 16, 2011 at 03:43 PM 0
Share

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)

avatar image Statement · Mar 16, 2011 at 03:45 PM 0
Share

You can also create a rotation from any directional vector using Quaternion.LookRotation http://unity3d.com/support/documentation/ScriptReference/Quaternion.LookRotation.html

avatar image Michael 16 · Mar 16, 2011 at 05:48 PM 0
Share

I can you explane more please? It's hard to me to understand what you said...

Show more comments
avatar image

Answer by efge · Mar 16, 2011 at 01:49 PM

Answer to your 1st question: Disable Simulate In World Space for the Ellipsoid Particle Emitter.

Comment
Statement
Joshua

People who like this

1 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Michael 16 · Mar 16, 2011 at 02:23 PM 0
Share

It doesn't works. It was diable before.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Particles behind/in front of other particles 1 Answer

Instantiated particles prefab has fewer particles 1 Answer

Explosion triggering another explosion 1 Answer

How do I make a shuriken particle system sub-emitter only emit after collision with a certain velocity? 0 Answers

Rocket Particle Smoke Fade-Away 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges