I'm trying to make a simple 2D prototype in GameMaker Studio 2 where there're multiple points of gravity, essentially static objects in the scene that attract the player-object based on distance and mass of the object. Does anyone know if this would be complicated to get working? I've been trying to find resources on how to do this, but so far I've not found much helpful, so if anyone has any pointers for me that would be much appreciated.
1 Answer
The difficulty really depends on your programming experience. If you're looking for a prefab solution I doubt you'll find one out there. Seems like a pretty straight forward coding challenge. You'll need to create an object and write some script that detects it's distance from the player and use the distance to determine how far to move the player toward the object. I suggest looking at GameMaker Studio 2's platformer sample game and using that as a jumping off point. Hope that helps, good luck!