playMaker

Author Topic: How to use Collision Event? [SOLVED]  (Read 821 times)

Adam Z

  • Full Member
  • ***
  • Posts: 207
How to use Collision Event? [SOLVED]
« on: July 01, 2021, 05:18:25 PM »
Hi everyone. So Im creating a teleportation VR system.

Attached to my hand is cube thats stretched out as a raycast pointer. I also have a Tag on that called "Ray". When I move that cube over a sphere, I'd like it to change color. I added a 'Collision Event' to the sphere, assigned the cube game object, use the tag Ray with an On Collision Enter. The sphere collider is set to "Is Trigger". What else am I missing to get it to work? Do I need a box collider on the cube?

Thanks!
« Last Edit: July 02, 2021, 11:01:28 AM by Adam Z »

misterjuly

  • Sr. Member
  • ****
  • Posts: 334
Re: How to use Collision Event?
« Reply #1 on: July 02, 2021, 10:24:30 AM »
I'm not an expert by any means, but did you set it the collision event to stay in the collision drop box? A collider set to is trigger is also very important. You can mess around with different collider shapes to see what works best, just make sure is trigger is turned on. I'll be honest I haven't messed around with raycasting yet, so you're ahead of me on that one! Like I said I'm no expert so all I said might not be accurate, but I hope it helps until one of the officials can assist. :)

ToxicFrog

  • Beta Group
  • Full Member
  • *
  • Posts: 139
Re: How to use Collision Event?
« Reply #2 on: July 02, 2021, 10:32:17 AM »
Add a rigidbody component on one of the two collision objects - Kinematic TRUE, Use Gravity FALSE

Adam Z

  • Full Member
  • ***
  • Posts: 207
Re: How to use Collision Event? [SOLVED]
« Reply #3 on: July 02, 2021, 11:01:56 AM »
Thanks everyone, I got some help on the Discord server so I'm good now