Jump to content

Can swipe gesture be caught?


Recommended Posts

1. Want to build a ball with texture, and if shown on phone, you can touch and swipe the ball, ball will spin according to your swipe direction. Is it possible on Babylonjs?

2. Also if I draw an aim (a cross) in center of the screen, is it possible to know if the aim "hits" any mesh? I know pointer can do that by looking into pickInfo.hit, but is it possible for a fix point on the screen (knowing its clientX and Y) which is not the pointer?

Link to comment
Share on other sites

Thanks, really cool demo. But it feels like not exactly what I want...

1. About the aim, I kinda think of a normal shooting game, where there's an aim drawing on the center of the screen. So whenever you press a key, if anything in the babylon 3d world is on the aim, it will be shoot down. So it is not a mouse moving onto the target thing (so not onPointerOverTrigger)... what I find confused is that aim is not the pointer, so I don't know what api to use. 

Edit: I find raycaster maybe what I what to use, but still have no idea how to create a ray from camera to the (x,y) point on device screen...

2. And I'm a bit confused, is the second playground demo showing similar pointer trigger, or is it about ball spinning?


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...