boyofgreen 7 Report post Posted March 24, 2017 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 Quote Share this post Link to post Share on other sites
aWeirdo 339 Report post Posted March 24, 2017 Hi @boyofgreen As long we're talking about a simple square, a bit of math can solve that right away; http://playground.babylonjs.com/#U0YL2#1 Quote Share this post Link to post Share on other sites