-- Issue: PIXI Interactive Event 'pointerover' only activating once instead of continuously
-- Goal: Hover over text to allow function to activate continuously until no longer hovering over text
-- Requirements: Use PIXI commands (I am able to 'event' this with other commands but want to stay with what PIXI has in its engine)
-- Details:
Hello! I have a question regarding PIXI's interactive events. Currently, I am able to use it just fine with the exception of one event command - 'pointerover'.
I am creating a PIXI.Text('DOWN') on the screen and setting its '.interactive' to true. The event 'pointerover' triggers a function to allow the player to move by simply hovering over the text with the mouse/pointer. It works, with the exception that it only triggers it once rather than continuously when the mouse/pointer stays on the text.
I checked the interaction frequency of PIXI and it is set to 10ms. I am able to move the pointer away from the text and then move the pointer back over the text, triggering it again. The issue is that it has to be moved and I'm trying to make it to where all you have to do is leave the pointer on the text to keep it moving.
Poryg had a great tutorial on this in the video below (unfortunately, you can't see all the code):
Does anyone have any clues on how to get it to continuously 'activate'? Would this be an issue with the PIXI version or is there code out there that I am missing? I am using PIXI v4.8.9.
The event listeners don't need a parallel process to keep listening for the mouse pointer events since that is already automated.
(On a different note, I am able to achieve this with a parallel event that checks the pointer position, but I wanted to stay away from that for now and see what else PIXI can do.)
Any assistance is greatly appreciated!
-- Goal: Hover over text to allow function to activate continuously until no longer hovering over text
-- Requirements: Use PIXI commands (I am able to 'event' this with other commands but want to stay with what PIXI has in its engine)
-- Details:
Hello! I have a question regarding PIXI's interactive events. Currently, I am able to use it just fine with the exception of one event command - 'pointerover'.
I am creating a PIXI.Text('DOWN') on the screen and setting its '.interactive' to true. The event 'pointerover' triggers a function to allow the player to move by simply hovering over the text with the mouse/pointer. It works, with the exception that it only triggers it once rather than continuously when the mouse/pointer stays on the text.
I checked the interaction frequency of PIXI and it is set to 10ms. I am able to move the pointer away from the text and then move the pointer back over the text, triggering it again. The issue is that it has to be moved and I'm trying to make it to where all you have to do is leave the pointer on the text to keep it moving.
Poryg had a great tutorial on this in the video below (unfortunately, you can't see all the code):
Does anyone have any clues on how to get it to continuously 'activate'? Would this be an issue with the PIXI version or is there code out there that I am missing? I am using PIXI v4.8.9.
The event listeners don't need a parallel process to keep listening for the mouse pointer events since that is already automated.
(On a different note, I am able to achieve this with a parallel event that checks the pointer position, but I wanted to stay away from that for now and see what else PIXI can do.)
Any assistance is greatly appreciated!