boyofgreen

contain a mesh inside other mesh

Recommended Posts

Hi All,

  I have a mesh that is a background, and you can move the other meshes on top of it (and a record the movement).  It's very similar to this example:

http://playground.babylonjs.com/#U0YL2#0

what I would like to do is keep the smaller mesh contained within the larger one.  Ideally, I would like to allow users to move the smaller mesh outside the larger one, but not completely off of it (there would still be like a 25px edge of the mesh so you could still touch it and move it).   I am sure I can just compare the xy of the smaller mesh and compare it to the area of the larger mesh, but I'm wondering if there is something that is already being computed that I can use.

Thanks,

Jeff

 

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.