Results 1 to 4 of 4

Thread: onCollisionExit not working as expected

  1. #1
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    80

    onCollisionExit not working as expected

    I noticed that onCollisionExit isn't firing when it should anymore.

    I have an object that has the functions

    onCollisionEnter(Table collision_info) and onCollisionExit(Table collision_info) as part of the objects script code.

    Used to be when I laid a card on this object, onCollisionEnter would fire and when I picked the card up off the object, onCollisionExit would fire.

    Now when I lay a card on this object, onCollisionEnter still fires, and immediately after that onCollisionExit also fires (before I even pick the card up) - When I pick the card up, onCollisionExit no longer fires.

    Not sure what's going on here.

    Andy

  2. #2
    Join Date
    May 2016
    Posts
    1,072
    Is this tied to the physics mode? If you set it to Full physics does it work correctly, then break if you set it to semi-lock physics?

  3. #3
    Join Date
    May 2017
    Location
    Rocklin, CA
    Posts
    80
    OK, I set to full Physics mode and now it works as expected (Like it used to work in Semi-Lock Physics mode)

    I don't know, is this the expected behavior now - onCollisionExit only works as expected in Full Physics mode?

    I liked it when it worked in Semi-Physics Mode

    Bummer

    Andy

  4. #4
    Join Date
    May 2016
    Posts
    1,072
    Yeah, I'm afraid this was a change that came about in the move to the newest unity version. Something about how unity handles things coming to rest, I think?

    My understanding is it might be a bug we'll have to live with for a while.

Similar Threads

  1. OnCollisionExit and OnCollisionEnter
    By Kijan in forum Scripting Bug Reports
    Replies: 4
    Last Post: 10-20-2017, 06:42 PM
  2. onCollisionExit() with Physics Mode in Semi-Lock
    By Eskander in forum Scripting Bug Reports
    Replies: 2
    Last Post: 07-27-2017, 08:59 AM
  3. Alt-zoom + Q/E on cards rotates opposite direction than expected
    By Spheniscine in forum Technical Support
    Replies: 3
    Last Post: 01-22-2017, 12:45 PM
  4. math.fmod(x,y) doesn't give expected results
    By albatross4242 in forum Scripting
    Replies: 4
    Last Post: 05-06-2016, 04:30 PM
  5. printToColor() not working?!
    By Lycake in forum Scripting
    Replies: 4
    Last Post: 03-08-2016, 11:55 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •