Q: EventSystems: what do buttons have that objects dont? A: Camera needs a physics Raycaster

I have been trying to get eventsystems interfaces like IPointerEnter to work on game objects for days now. I finally decided to pop my scripts using these interfaces on UI buttons, and they work.

What do I need to do to make a game object (3d with collider) behave like a button when it comes to using the event systems?

You need a Collider on the object and an EventSystem in the scene. You might also need a PhysicsRaycaster on your camera, but I’m not 100% sure about that part.

1 Like

I had Colliders and EventSystems 100 different ways from sunday, and different layers, no worky.

I put a physics raycaster on my camera… now worky. That was it.

TY

1 Like

Now it is blocking my scripted physics.raycasts. That’s Event Mask is for. Got it.