Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Kaha · Dec 29, 2012 at 01:41 PM · collisionparticleunity 4shuriken

4.0 shuriken: particle collision with GameObjects

Hi,

I'm trying to make a gun throwing liquid using the particle system from unity 4.0 (shuriken I think). So the particle system is on-set, the particles are bouncing on world objects, I activate the gun by pressing "fire1" and when released it stops firing.

Now I need the particles to push objects with rigidbodies. I have found the OnParticleCollision function, but I think it's only working on the legacy system.

 function OnParticleCollision (other : GameObject) 
 {
     var body : Rigidbody = other.rigidbody;
     if (body) 
     {
         var direction : Vector3 = other.transform.position - transform.position;
         direction = direction.normalized;
         body.AddForce (direction * 5);
     }
 }

Does anybody know how to apply force to an object (with a rigidbody and collider) when it is hit by a particle ? Any tutorial, link, code example, piece of advice is welcome !

Thanks in advance.

Comment
Add comment · Show 3
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 Ben-Stoneman ♦♦ · Jan 03, 2013 at 03:25 PM 0
Share

Try This link: http://answers.unity3d.com/questions/240973/particle-collsion-with-a-separate-object.html

Once you know how to recoqnise a particle has hit an object, you can add force to it.

avatar image Kaha · Jan 03, 2013 at 06:49 PM 0
Share

Thanks for answering. I have put this project aside since Shuriken is said to be designed for "visual beauty" only.

avatar image LexGear · Mar 16, 2013 at 09:47 AM 0
Share

Same boat as $$anonymous$$aha...

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Jesper Mortensen · Mar 07, 2013 at 03:00 PM

We are actively working on collision messaging ATM and with any luck it should go into Unity 4.2. With this you will be able to add forces to rigid bodies on particle collisions. I will be sure to add a doc sample that does exactly that.

Comment
Add comment · Show 5 · 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 LexGear · Mar 16, 2013 at 09:48 AM 0
Share

If you don't $$anonymous$$d me asking, who is "We"? Do you work at Unity?

avatar image Jesper Mortensen · Mar 18, 2013 at 07:55 AM 0
Share

"We" are the Unity development $$anonymous$$m.

I do work at Unity and have been coding up this feature targeted for shipping in the next Unity 4.2 alpha release. Quite a few people requested this feature, and voila, here it is;-)

avatar image LexGear · Mar 19, 2013 at 12:14 AM 0
Share

What happened to 4.1?

avatar image Jesper Mortensen · Mar 19, 2013 at 08:47 AM 0
Share

That has just been released, check the website.

avatar image jococo · Aug 24, 2014 at 08:00 AM 0
Share

Was this ever fixed? I have tried adding a rigid body and collision body. I add a force to the rigid body connected to particle system. I see the collision body bounce around but the particle system just sits in place. Trying to make a fireball that explodes on collision.

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

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Is there a way to adjust the particle collision threshold point ? 0 Answers

Unity Particle System collision detection problem 1 Answer

Shuriken and OnCollisionParticle 1 Answer

Particle prefab with plane collision. 2 Answers

Stop Door Loop 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