MistOfShades Posted February 16, 2021 Share Posted February 16, 2021 Hello fellow gamemakers! I have a question about PIXI InteractionManager My Pixi version is 5.3.7. I'm testing on desktop Windows 10 and latest Chrome. Is it safe to interrupt InteractionEvent and change it's .currentTarget and .target properties? I have an object which on drag creates another object and calls it's .onDrag(event) method with event.target changed to new object, so drag can happen seamlessly. Like, for example, imagine a coin pile as a singular Sprite, that on drag creates one coin Sprite. So, for now it kinda works. But I read source code for InteractionManager and didn't found anything directly related to .target property in hit-tests logic. Thus I decided to aks here. Is it safe to juggle events between objects like that, or such behaviour completely unintended and can break in future versions? Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted February 21, 2021 Share Posted February 21, 2021 (edited) > Is it safe to interrupt InteractionEvent and change it's .currentTarget and .target properties? Its on level "i wanna make interactionManager work like i want". Not safe, but required for many games PixiJS InteractionManager is often not enough, that's why, for example, we have separate TreeSearch class - people can override certain algorithms. Edited February 21, 2021 by ivan.popelyshev Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.