playMaker

Author Topic: Collision 2d Event - Collider Gameobject not always stored  (Read 1456 times)

joel.carlson

  • Junior Playmaker
  • **
  • Posts: 66
    • Salvation's Story
Collision 2d Event - Collider Gameobject not always stored
« on: February 09, 2015, 02:07:53 PM »
Hey there, guys! Alright, this has had me scratching my head for many days.

I have a bunny gameobject. The idea is that once two of these bunnies come in contact, they kiss each other and make another bunny. This is how I have it set up (screenshots attached).

Bunny collides with Bunny
Bunny stores collided bunny as a gameobject "BunnytoKiss"
Bunny then checks for a handshake, making sure that the "BunnytoKiss" also references the bunny as the "BunnytoKiss". (so they know they're going to kiss each other before any movement takes place)
Once this handshake occurs, one bunny will move into the kissing position.

Unfortunately, sometimes the gameobject variable isn't stored at collision. I have no idea what the issue is. And if this can't be solved, I'm definitely open to figuring out how two Prefab gameobjects can do a 'handshake' of sorts!

Here's a video of it in action (though the problem isn't shown in this video)
Check out Noah's Elephant in the Room, Bible ABCs for Kids, Bible Coloring for Kids, and Noah's Bunny Problem at
Salvations Story