0
\$\begingroup\$

I'm pretty new to Game Maker Studio 2 and I've hit a wall in programming with their built-in physics engine. I created a irregularly shaped object and I want to modify the collision shape so that it fits the shape of the sprite. In the built in collision shape editor it only allows you to create a convex shape with a max of 8 points. Is there another way to do this without having to plot out points individually in code?

Thanks!

\$\endgroup\$
1
  • \$\begingroup\$ Have you tried using sprite masks? They let you define two separate sprites for each object: a rendering sprite, which you see when drawing on the screen, and a mask, which GameMaker uses to compute pixel-perfect collisions. This works best for 2D projects. \$\endgroup\$ – liggiorgio Jun 5 '20 at 13:51
1
\$\begingroup\$

Go to the sprite you want to make the precise collision, go inside the collision mask dropbox and change the type from rectangle to "precise per frame". Keep in mind that this will be a bit slower than other types of collision (not sure how much tho).

Where to find it

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.