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 Jeff-Kesselman · Feb 18, 2013 at 12:41 AM · collisionwindowsunity4

What could cause aberrant collision callbacks in Unity4?

Hi,

We're using the Goldstone book in our intro to 3D Game Development course and have ran into an odd bug. It appears to be an engine bug but I was wondering if anyone else has seen it and might know what causes it or how to prevent it.

Semi-randomly, my students can get a collision with the all the power cells to trigger at the same time even though their player controller is nowhere near some of the power-cells at the time.

Ive examined it up, down and sideways, put debugging logging in the code and it really just seems to be a pathological event thrown on Unity's part. So far, we've only see the effect on Windows.

Any confirmation and/or workarounds would be much appreciated.

Edit Addl:

Here is the script that is firing aberrantly:

 using UnityEngine;
 using System.Collections;
 
 public class PowerCell : MonoBehaviour {
     public float rotationSpeed = 100f;
     public bool collected;
     // Use this for initialization
     void Start () {
         collected=false;
     }
     
     // Update is called once per frame
     void Update () {
         transform.Rotate(new Vector3(0,rotationSpeed*Time.deltaTime,0));
     }
     
     void OnTriggerEnter(Collider col) {
         Debug.Log ("power cell trigger "+ gameObject.name);
         if(col.gameObject.tag=="Player") {
             if(!collected) {
             col.gameObject.SendMessage("CellPickup");
             Destroy(gameObject);
             col.gameObject.SendMessage("HUDon");
             collected=true;
             }
         }
     }
 }

The entire project can be downloaded at:

https://www.dropbox.com/s/v22f9h62qcqa7co/Island%20Unity%20Project.zip

These are the best reproduction instructions we coudl coem up with:

Sometimes, when walking around, the power cells are picked up even though the player controller is not colliding with each object. This occurs while walking either next to or on the outpost or on the ground in the area around the outpost where each power cell is located.

Note that when he says "not colliding' he means that he shouldn't be colliding. We DO see collision call back on every objet individually.

Comment
Add comment · Show 15
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 Doireth · Feb 18, 2013 at 01:26 AM 0
Share

You really need to post more information such as the script you are using. Unless somebody has read that specific book, your question will go unanswered.

avatar image Starkid225 · Feb 18, 2013 at 02:42 AM 0
Share

Hey Jeff,

It would be of great help if you could post the script that you are having problems with. It would help us help you better. It could very well be an engine problem but im not aware of a bug like that in Unity 4. If we could take a look at the script we can see if there may be anything there that could be causing it. Thanks!

avatar image Jeff-Kesselman · Feb 18, 2013 at 02:54 PM 0
Share

Sure, Ill post the script up. Do you want the whole project too?

avatar image Jeff-Kesselman · Feb 18, 2013 at 02:58 PM 0
Share

Just a note, I wont have the script up til Thursday because thats the next time Ill be on campus.

avatar image Jeff-Kesselman · Feb 18, 2013 at 03:13 PM 0
Share

@Doireth Its the most commonly mentioned book on Unity in the entire community, so I thought that was self-explainatory. here's the Amazon link

Show more comments

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

15 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

Related Questions

materials and textures go missing on my machine. 0 Answers

Black screen after a crash - Windows build only 1 Answer

Unity wont detect when my objects collide? 0 Answers

Unity wont detect when my objects collide? 4 Answers

Advanced collisions: mesh collision? 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