Replies: 1 comment 1 reply
-
If all you have is a rectangle, Bullet will be overkill (note that Bullet is independent of the file format, it operates on arbitrary meshes). In your case you could apply the inverse projection to go from a point on screen to world space coordinates. Then using the ray in world space coordinates you can compute the intersection point with your rectangle. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I heard in another conversation here, regarding raycasting, that you can use Bullet Physics with Filament to detect a collision between two elements. My question is about touching the screen. I don't have .gltf or .glb objects, but a rectangle that I draw using filament. The anchor I use to place my rectangle is only on point A of my rectangle, at the bottom left. I would like to know if, after having drawn my rectangle, by touching my screen, I can detect the corresponding point on the surface of my rectangle thanks to Bullet Physics? Or does it only work with .gltf or .glb objects?
Perhaps there are other solutions to do this directly with Filament?
Beta Was this translation helpful? Give feedback.
All reactions