# gravity

1. ### 3D [RESOLVED] Adding centers of gravity to 3D GMS2

Hey there! After working on 2D projects for about a year I've decided to try out 3D in GMS2. For now I'm focusing on player movement and the visual style, but I know the game is going to involve jumping between small planetoids with their own centers of gravity, and I have no idea how that would...
2. ### SOLVED Need help with current ladder code - all assistance appreciated

I'm trying to do some basic ladder code without state (since I'm not very good writing them) and below is what I have (scroll to the end of second code posted). While the current ladder code works my problem is the player 1) keeps bouncing on top of the ladder once they reach the top----bouncing...
3. ### GML Object goes 1 pixel too far with anti-gravity

I've tried using my normal method of gravity and vertical collision and making it work for anti-gravity, or in other words, falling upwards and not downwards. // Create Event vsp = 0; grv = 0.1; jumpsp = -2; // jump_delay used for staying on the ground 50 frames before jumping again...
4. ### GML [SOLVED] When apply gravity in platformer game - after calculating all speeds and knockbacks or...?

General question - when apply gravity in platformer game: 1. after calculating all speeds and knockbacks, etc so gravity should be applied last? 2. or maybe when I calculate basic movement and after gravity add knockbacks, etc? Thank You
5. ### Keep ball bouncing

Hi all, I have a problem. I created this game where I have a ball that can bounce against the walls, but I also want to keep the ball bouncing for a minimum speed, so the ball can go faster than that, but it must be bouncing a bit! Here is my step event code: //apply gravity yspd += grav...
6. ### Windows Gravity and Key problems

I watched the tutorial on making a platform game by Shaun Spalding. I have no compile errors and I have watched the video twice now. I have a logic error. Everything runs but when I try and play the game the character zooms off the screen in a straight line. Clearly my gravity, and keys are not...
7. ### GMS 2 How can I orbit an object around another?

I'm trying to make a game similar to One More Line but I cannot think of a solution to making it so when I click a button, it latches on to the stationary object and revolves around it with a fixed radius. I believe watching gameplay of or playing One More Line would help to understand my...
8. ### Windows ArrJiiBii - Short Platformer (Prototype?)

I took a break from my current game to put this together. It was really fun to use techniques that I picked up over the course of making my other game, but couldn't use because of old code getting in the way. While it's not the most original concept, I really enjoy playing it, which is not...
9. ### Change of gravity based on momentum

I have been using GameMaker for 4 months now. In the past I've made several platformers but I'm now trying to make a 2d racing game. I am also using the built in physics engine for the cars. I would like the game to check the velocity that the car is moving and if there is a wall under the...
10. ### Programming orbital paths

Basically, I am trying to make a game where you shoot a missile around several planets, and you have to use the planet's gravity to get your trajectory right. I need to know how to program a system where I can simulate planetary gravity while allowing the player enough leeway that they don't...
11. ### Discussion Moving Kinematic Object in Physics Room

I'm trying something out working with physics and still a bit new to it. I'm using physic in a room, but I have one object that I don't want to react to gravity, but still want to collide with other objects. So the way I understand it, is that I need to make it kinematic, and the density needs...
12. ### GML instance_nearest not working properly

Hi all, I want my player to detect the nearest obj_planet and then run some code, but when I put in more than one of the object in the game room, one of the objects stops working and the other one works with 2x the strength of it's intended values. Here's my script: //Gravity grav_eff =...
13. ### GML Tilting Collisions

Hi all, so I have a ship that flies around in space and I've been working on collisions for planets. I just finished the gravity mechanism. How can I get my ship to fall over onto it's side when it hits the planet? Or if the landing is perfect, how can I get the ship to sit perfectly on both of...
14. ### Legacy GM Gravity with delta_time

I was trying to add a system to make my game show no delay when playing and I started to have problems with gravity ... when multiplying the gravity by delta I started to see errors such as the player jumps very little when the game runs at 30FPS, but when the game increases to 60FPS it jumps...
15. ### Legacy GM [SOLVED]Player Able to Flip Gravity Twice Instead of Once

Hey all! As a sort of pet project I've been attempting to recreate the game engine for the popular indie game VVVVVV within GMS 1.4. Everything has been going smoothly so far but I've had an issue for a few weeks now and I just can't seem to figure out how to resolve it. Within my game, the...
16. ### Simulating gravity with slowmotion

Hi I'm currently working on a strategic space game where in you control a space ship and shoot projectiles, all affected by gravity generated from nearby planets. This currently works fine as is but I was wondering how I would go about implementing slowmotion/speedup of time in the gravity...
17. ### GRAVITY IN GAME TOO STRONG

For the entirety of the time I've been working on my current project, I have been having some issues the gravity, and slope collisions. The gravity of the game works fine as long as vertical speed has been increased beforehand, for example if the player jumps. If the player walks off the side of...
18. ### GMS 2 How to make crates with physics

Hi everyone, I'm trying to make a puzzle platformer similar to games like Limbo and Inside. I have crates that can be pushed and are affected by gravity, but how would I go about allowing these crates to rotate when they move? As in, if you push a crate off a ledge, it'll rotate a bit until it...
19. ### Legacy GM Help to stop object's bouncing?

Hello, I am trying to create some sort of simple object bouncing system. I have a problem that my object starts to bounce infinitely. How I can fix it? Create event: // Variables z_floor = room_height/2; z = -200; zspeed = 0; Step event: if (z < z_floor) { // Gravity zspeed ++; }...
20. ### Delta Time speed problem

I'm having a very bizarre delta time problem that I can't figure out how to fix. Accelerations actually work perfectly, since I followed this tutorial: https://web.archive.org/web/20160307185547/https://www.niksula.hut.fi/~hkankaan/Homepages/gravity.html The problem is this: when I make my...