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 /
  • Help Room /
avatar image
0
Question by conneraiken · Oct 21, 2015 at 12:18 AM · physicsparticlesparticle system

Cant get OnParticleCollison to trigger (Bug?)

Hi guys,

I have done some searching and I'm not able to find my issue solveable.

I have a BulletParticle object, which shoots particles from a Bullet Spawn Point object which is nested inside my players weapon.

I have the particle system setup on the bullet, collision is enabled and Send Collison Messages is checked. I have run checks on my particle emitter, which is working fine. I am unable to get a trigger on OnParticleCollison();

In this case, I am trying to shoot the gun which emits purple particles and have it move a cube.

BulletParticle Inspector

  • Particle System (Renderer is set to StretchedBillBoard, collison is enabled with world! - collides with everthing)

  • Particle Direction script (Weapon is set to bullet spawn point)

  • No collider

Cube Inspector - Box Collider (Is Trigger is not set) - Mesh Renderer - Rigid Body

Here is my code as well.

 using UnityEngine;
 using System.Collections;
 
 public class ParticleDirection : MonoBehaviour {
 
     public Transform weapon;
 
 
     // Update is called once per frame
     void Update () {
         transform.position = weapon.TransformPoint(Vector3.zero); 
         transform.forward = weapon.TransformDirection (Vector3.forward);
     }
 
     void OnParticleCollison(GameObject other) 
     {
         Debug.LogError("Particle collison");
 
         Rigidbody body = other.GetComponent<Rigidbody>();
         if (body) {        
             Debug.Log("Collison", gameObject);
             Vector3 direction = other.transform.position - transform.position;
             direction = direction.normalized;
             body.AddForce (direction * 5000);
         }
 
     }
 
 }
 


Included Images/Video http://imgur.com/a/gvpeo

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

0 Replies

· Add your reply
  • Sort: 

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

35 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

Related Questions

Are there any disadvantages to using the legacy Ellipsoid Particle System in Unity 5 over Shuriken. 0 Answers

Looking for a way do stretch particles according to emitter movement and/or apparent camera movement as well 0 Answers

How to make Particle System on when I throw grenades on ground after 5 second. 3 Answers

Moving a singular particle to the cursor 0 Answers

How to make a particle system evenly lit? 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