Download

change material on clicking an object (mouse cursor problem)

hi mates, i am trying to build a level where i can modify the object materials at run time. i have attached an image of the blueprint, it all works fine except i need mouse cursor in the scene and when i enable it from playercontroller settings another problem starts, now i can only move the camera (look around) if i keep the left mouse button pressed. any way to get past this hurdle? or my whole approach is wrong? i am kinda new to blueprint.

bumping this up, anyone? :slight_smile:

Hello,
Do you use the same button to show mouse cursor ? And do you use press / release ?
When i need to have mouse cursor visible / active, i use right click or a keyword not used and from this event: pressed : flip-flop (to toggle on click ) / get controller / set show mouse cursor / set enable mouse over event / set enable click event. (It can be added/ remove when you add to viewport / remove a widget too but only one line without flip-flop)

thanks for the response Fen, i have permanently enabled mouse cursor in playercontroller, are you suggesting that i shouldve have another shortcut to enable/disable mouse cursor?

It depends of your setting / game situation, but at least, i think that if you flip flop instead of pressed release, you’ll no more have to press button and if one event does troubles with another then, yes, the best imho is to use different keys.