Jump to content

Increase Hit Test Size


ChrisR
 Share

Recommended Posts

Im trying to do a hit test on a skinny mesh, so i want the meshes hit box area to be bigger than the actual mesh so that its more user friendly. I have tried to make its bounding box bigger, but that doesn't work. Is there a way to do a hit test on the bounding box area? 

 

Example of what i am trying to accomplish that doesn't work.

 

http://www.babylonjs-playground.com/#EAR83

 

 

Also instead of using action manager i have tried just doing a hit test every fram using jquery and scene.pick. This also doesn't use the bounding box info. Coded as such:

$('#canvas').mousemove(function(evt) {      var pickInfo = Editor.scene.pick(Editor.scene.pointerX, Editor.scene.pointerY);      if (pickInfo.hit) {         console.log(pickInfo.pickedMesh.name);      } });

Any help would be appriciated. Thanks.

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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