without pressed key Y, console.log(pos, name); works logging pos and name but
I want to combine keyboard press with app event how to do it?
so I can after key Y was pressed do sth in onTriggerData callback
I tried in init but then key press not working so trying in update
@grzesiekmq, I’d say just initialize a boolean variable to false in your initialize function. Then, if the key is pressed, change it to true. In your event function, check whether it is true. If it is true, do whatever you need to and then set it back to false.
Hello @grzesiekmq! In your last post this.check is always true when you do the if statement. I don’t quite understand what your problem is yet. Can’t you just fire the event when the Y button was pressed? Or maybe only update the position when the Y button is pressed.