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 msafa · Oct 03, 2017 at 10:42 PM · collidertriggerparticle system

particle system's collider doesnt work

Hi everyone,

I'm trying to use particle system with collider in my project. The aim is destroy barrier with fire (using collider) But I have slight problem here. when I hit something with particleSystem's collider, the code going to "SnakeHead" collider which is particleSystem's parent. you can see on below the system.

Any idea?

Many thanks.

alt text

flamecollider.png (156.0 kB)
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 AshwinTheGammer · Oct 04, 2017 at 11:50 AM 0
Share

So what you wanna do ? I didnot understand this link "The aim is destroy barrier with fire (using collider) " What is code of snake?

avatar image msafa AshwinTheGammer · Oct 04, 2017 at 12:00 PM 0
Share

Sorry about my english :)

In normally when snakeHead hit the white ball (barrier) ,the game will over. I wanna added a fire (which is particle system). When I use fire function, I can destroy the barrier thats why I use collider on particle system.

When I seperate snakeHead and particle system it works but when I use snakeHead as a parent for particle system, it doesnt work. because the system get particle system's collider as a snakeHead's collider.

avatar image tmalhassan msafa · Oct 04, 2017 at 02:49 PM 0
Share

What I understood is that you have a "barrier" (something like a wall?) that should be between the white ball and the head of the snake. Initially, going through the barrier will kill the snake and end the game. Unless the player presses a button which will release the fire and that is supposed to destroy the barrier?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by AshwinTheGammer · Oct 04, 2017 at 12:00 PM

I think you`re saying that you want to destroy the barrier with fire when snake collide with barrier so first of all add then Particle System to Barrier and then tag the barrier with name"fire" and then in snake put this line :

  void OnCollisionEnter(Collision col){
     if(col.gameObject.tag == "fire"){
     Destroy(col.gameObject);
     }
     }

Make sure that you have default collider added to barrier alt textSee the image for info

I hope it will help you :)


capture.png (90.4 kB)
Comment
Add comment · Show 2 · 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 msafa · Oct 04, 2017 at 12:18 PM 0
Share

I put under the SnakeHead because I want to make that the particle system is being a part of snakeHead (for getting position automatically and etc. :) )

avatar image AshwinTheGammer msafa · Oct 04, 2017 at 01:15 PM 0
Share

I still didn`t understand why are you putting the particle system in snake`s head what is the meaning of this line "for getting position automatically and etc. " what is ur main problem pls simplify it more.

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

101 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

Related Questions

Can't click gameobject when over another trigger? 1 Answer

Using two trigger colliders 1 Answer

On Collide script not working! 1 Answer

Trigger Spawning? 1 Answer

Temporarily ignore collisions between player and enemies 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