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 zeroisthenew1 · Apr 06, 2019 at 08:45 PM · collisionparticle systemparticleignorecollisionignore collisions

IgnoreCollision with Particle System

Is it possible to IgnoreCollision between a Rigidbody and a ParticleSystem?

Or anything I can do after I detect the collision that I want to ignore?

PS: Like in IgnoreCollision() I need the case that the Particles and the Rigidbody don't collide at all physically.

(I know that I can specify Layers to collide. But the Players are colliding with their own particle system(Gun Effect) and if I disable the collision using Layer, there are a lot of other Players and the Gun Effect is not colliding with them too (which makes the particle system affectless and pointless.)

I need to IgnoreCollision between each ParticleSystem and its own parent)

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 highpockets · Apr 06, 2019 at 10:13 PM

You could put the particle system game object as a variable on your player script and when:

 void OnCollisionEnter(Collider other){
 
 if(other.gameObject != particleSystem){
 
 // you just ignored the child particle system
 }






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 zeroisthenew1 · Apr 06, 2019 at 11:07 PM 0
Share

Thanks but in that case the collision still occurs physically. I already ignore it on the script side. I should add "physically" to the question. Like in IgnoreCollision(parameter1, parameter2) two specified parameters does not collide at all. But that function doesn't work with Particles.

avatar image highpockets zeroisthenew1 · Apr 07, 2019 at 06:19 AM 0
Share

You also state:

“Or anything I can do after I detect the collision that I want to ignore? ”

In your question..

Check out Physics.IgnoreCollision:

https://docs.unity3d.com/ScriptReference/Physics.IgnoreCollision.html

Although it states “Note that IgnoreCollision will reset the trigger state of affected colliders, so you might receive OnTriggerExit and OnTriggerEnter messages in response to calling this. IgnoreCollision has a few limitations:” So there still is detection of the collision. I’m guessing you want to do this so as to not have unnecessary calculations because the code I provided should work for what you need. The thing is, even if you take the collider off of the particle system and try to do it manually, there will have to be checks so as not to affect the player that emits the particles.

avatar image zeroisthenew1 highpockets · Apr 07, 2019 at 11:04 PM 0
Share

I'm trying to ignore the collision because the gun effect gets effected by the player who shoot it. Calculations are not a concern. Gun should collide(by collision I mean doesn't go through. Stop at the surface of the object) only when it hits enemies(which are other Players). But it collides with the player who shoots the gun(as if it hit an enemy). As a result of this: The gun doesn't go through the player who shoot it. Because I can't find a way to ignore this, I'm shooting the gun starting far from the player's collider. But that makes a big gap between the player and the gun effect. If I could ignore the collision physically or if I could reset/revert the collision before just it starts to occur physically the problem will be gone.

Show more comments

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

162 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Using Particles with Collision 2 Answers

How to have a particle system Ignore collision with objects 1 Answer

Can I make uniform emission for Particle System? 2 Answers

How to detect when and where a particle hits a surface? 4 Answers

Get sprite id or grid x and y from particle on trigger. 0 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