question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use hitTest with v7 events

See original GitHub issue

Before v7, we could do renderer.plugins.interaction.hitTest(point), do we have something similar in v7?

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
bigtimebuddycommented, Nov 9, 2022

@Snowblaze not sure what’s going on with that error. The file is definitely in the package.

But I fixed the example so it runs.

1reaction
ShukantPalcommented, Sep 28, 2022

Yeah, the rootBoundary.rootTarget is set by the EventSystem and is the lastObjectRendered:

https://github.com/pixijs/pixijs/blob/e5cc328a2374fac1cb21915e8029d8a9bddb038c/packages/events/src/EventSystem.ts#L203

That’s because you could render something other than app.stage. If you want to do a synthetic hit test, I would suggest having your own EventBoundary.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uiview - Event handling for iOS - how hitTest:withEvent: and ...
In hit-testing, a window calls hitTest:withEvent: on the top-most view of the view hierarchy; this method proceeds by recursively calling ...
Read more >
hitTest(_:with:) | Apple Developer Documentation
This method traverses the view hierarchy by calling the point(inside:with:) method of each subview to determine which subview should receive a touch event....
Read more >
hitTest(_:with:) vs point(inside:with) | by Steven Curtis - Medium
When a touch event is detected, it starts at the root view controller and calls hitTest(_:with:) on that root view. The subviews are...
Read more >
Hacking Hit Tests - Khanlou
-hitTest: uses -pointInside: to tell the caller which subview (if any) would be the receiver for a touch at a given point.
Read more >
Hit-Testing in iOS - smnh
iOS uses hit-testing to determine which UIView is the frontmost view under the user's finger that should receive the touch event.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found