OnClick/OnTouch not working

**RESOLVED

Steps taken to resolve:

  • Go to project settings > Engine > Input > UNCHECK Use mouse for touch.
  • Create new Player Controller/open current and CHECK Enable Click Events, Enable Touch Events, Enable Mouse Over Events, Enable Touch Over Events.
  • Under Collision for the object you want clickable VISIBILITY must be set to BLOCK.

Make sure if you have to make a new game mode or player controller that you set those as default.

**

I have an actor with a Paper2D sprite and a collision box that is set to receive touch and mouse click input, but is not doing so. I’m not entirely sure what collision should be set to, but it doesn’t appear any type of interaction is being recorded. The sprite is colliding with other objects properly.

Previously I did have touch/click events working in another blueprint but I removed those, and haven’t been able to figure out how to reproduce these events.

Engine 4.9

Sprite collision is set to a special channel that only overlaps another specific channel.

Collision box is set to overlap all.

8f497e3813e6716cfe1af65b06179f360c395075.jpeg

2 Likes

Does your player controller blueprint have touch/click events enabled?

The player blueprint is receiving input but this is not the player blueprint. I couldn’t find an option to have touch/click events enabled either.

This is causing a huge problem with my project. I literally cannot progress past this point until onClick is working. Are there any other suggestions?

I’ve also set Enable Input on the actor which should be registering clicks.

Followup: I found the option you were referring to after I made a new player controller and assigned it in my game mode. Even with the options enabled the problem persist.

RESOLVED

Did everything you suggested. Using 4.14. Still not working in my project :confused: At a complete stand still. I can’t even get a simple string to display when I click on a basic mesh in a brand new project. Is there something I need to add to the Touched Actor or Button Pressed for the OnClick event?

i have the same problem with some static mesh, normal static mesh works, but my custom static mesh does not work.

The Same problem tried all the stuff, it is working for static mesh actor BP_class , but when you added static mesh COMPONENT to an actor class - nothing helps.

Thanks so much!

If somebody is passing through by this topic, i was having the same problem. I tried all described steps above and didn’t work. So, i finally solved this issue unchecking this box:

Project Settings => Engine => Input => Always Show Touch Interface

Ps.: I am still trying to understand the reason, but this is a solution.

1 Like