Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • 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
0
Question by zeta274 · Apr 18, 2016 at 01:28 PM · instantiatetransformparticlesparticlesysteminheritance

How do I make instantiated particles inherit Transform movement from their parent object?

I am using the Unity particle system to pop coins when I pick them up, but I pick them up in motion. I want the particles to fully inherit their parent object's transform. How do I do this?

Comment
Add comment
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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Cherno · Apr 18, 2016 at 02:27 PM

Set the Particle System's Simulation space to local.

Comment
Add comment · Show 3 · 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 zeta274 · Apr 18, 2016 at 02:32 PM 0
Share

Actually, I want to set it to world, but either way I misspoke in the original post. I am using a particle generator from Unity's standard assets, but apparently that doesn't use particle system at all, making it hard to figure out how to make it "world".

avatar image Cherno zeta274 · Apr 18, 2016 at 03:21 PM 0
Share

Disregard the answer then as it doesn' apply to the question you are now asking. What exactly do you mean by "inherit their paren't transform"? Should they somehow be generated in local space relative to their parent, or should they inherit movement velocity? I don't know about this Particle Generator you speak of, How does it work? Does it just instantiate clones of prefabs?

avatar image zeta274 Cherno · Apr 18, 2016 at 03:45 PM 0
Share

I probably should have pasted this to begin with.

public class ExplosionPhysicsForce : $$anonymous$$onoBehaviour {

     public float explosionForce = 4;

     private IEnumerator Start()
     {

         
         // wait one frame because some explosions instantiate debris which should then
         // be pushed by physics force
         yield return null;

         float multiplier = GetComponent<ParticleSystem$$anonymous$$ultiplier>().multiplier;

         float r = 10*multiplier;
         var cols = Physics.OverlapSphere(transform.position, r);
         var rigidbodies = new List<Rigidbody>();
         foreach (var col in cols)
         {
             if (col.attachedRigidbody != null && !rigidbodies.Contains(col.attachedRigidbody))
             {
             rigidbodies.Add(col.attachedRigidbody);
             }
         }
         foreach (var rb in rigidbodies)
         {
             rb.AddExplosionForce(explosionForce*multiplier, transform.position, r, 1*multiplier, Force$$anonymous$$ode.Impulse);
         }
     }
 }

This script is part of Unity's standard assets. There's also ParticleSystem$$anonymous$$ultiplier, but I don't think you need that, it just runs some math. Anyways, I drop this in a game object, I run it and boom, I get a flashing white particle. Problem is, that game object is moving, fast. And when the particle pops (and grows outward), the object continues moving, but the particle stays in place. It should be moving. I need some way to either

a. Add custom movement to the generated particle(s) or b. Force those generated particles to Space.World or some form of inherit movement.

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.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How do I Update the transform of Instantiate prefab? 2 Answers

Syncing particle system in Photon Unity Networking 1 Answer

How to Instantiate gameObject where a particle dies 2 Answers

Generating a particle effect on top of a GUIElement 1 Answer

bind instantiated particles to an object 1 Answer


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