Mik Posted September 28, 2019 Share Posted September 28, 2019 Hi all, i would to drag with mouse the red circle inside the gray "tube", constraining it position so it will be inside the tube and not overlaps the purple circles. Can someone help me? Thanks Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted September 28, 2019 Share Posted September 28, 2019 PixiJS doesnt have anything related to physics in the package However the task itself will be much easier if you imagine that tube is smaller by R, and those circles are bigger by R, where R is your character circle radius - that way you'll have to check whether point lies in a shape , and pixi has it. Quote Link to comment Share on other sites More sharing options...
Mik Posted September 28, 2019 Author Share Posted September 28, 2019 Thank you for your reply; if you intend physics in sense of gravity or similar, i don't need it, since i mean the map as top view, and i need to constraint the 2d moves. Anyway can please tell me the api to use for "whether point lies in a shape "? Moreover i'm not forced to use PixiJS, can you suggest another framework capable for my needs? Thank you! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.