Force, meteor and space grandma

Hi, so I am trying to convert my game to Gdevelop 5 and I am kinda stuck… so I want to do this:

so I figured out I will use “put object around another” but there accured issues:

  1. It works only sometimes, and by that I mean only sometime player sticks to the meteor
  2. player sticks to the meteor in fixed position, so I tried to use this expresion:
    also: player have separate object for feethitbox, becuase I want it to stick to meteor only when you touch it with feet, when you touch it with four head you die
    So… I would really apreciate every idea how to solve it, thanks!

Can you explain it in detail? Do you want the player to stick to the meteor when it is close to it? How are you moving the objects? It will be really useful if you can share your project so that we can try out way that works best for your game. If you can’t a screenshot of the code will be useful

of course :slight_smile: so I want the player to stick to the meteor when hitbox feet touches it, and stick to it, until player presses space bar, then player jumps into space and gets force and angle of meteor and in the same time meteor changes it’s direction to an opposite. You can only rotate player by using your mouse (my system is super chunky so I would apreciate all new ideas how to make it more efficient) and can’t really move the player, so basicly: you float in space and you can change your direction only by using floating meteors
here is link to my project: Gdevelop5 - Google Drive
I know it is a mess, sorry for that

1 Like

I will try to find a fix ASAP :wink:

1 Like

thank you very much! :slight_smile:

1 Like

Hi, good news, I found a solution for the problem :grinning: The post might be a bit long, make sure to read the whole post to understand what I changed. I have also added the project with the changes I made.

Here is the whole code:

So, you had put the “head_hitbox” and “Feet_hitbox” on the player by using the “Put object around another” event, But, that was slow and did not always working. So, what I did was that I made points called “Head” and “Feet” on the player and set the position of the hitboxes according to the point.( I have added the points to all the player animations if you want it in the future)
Here is what a “point” is, if you don’t know: Edit Points [GDevelop wiki]

I have also changed the “orgin point” of the hitboxes to the middle so that is it is in the correct place. Then, I changed the angle of the hitboxes to the angle of the player so, that it is aligned.

I made a variable to check if the player is on a meteor. Before, the player will detach when the feet was not in collision. That, made the player not stick to it always. Now, it will only detach if you click

Now it works, here it is in action. The player can still rotate even if it on the meteor, But, you can fix it by adding a condition on the event that rotates the player, to check if the player is not on the meteor (This can be done by check if the variable I added is “False”)

Player still can rotate

It detaches only when clicked

Here are the other problems that I found

  • In the “At the beginning of the scene” both the events to change the position of the “cursour flow” object were to set the X position
    I did not change it as I thought you might have done it for something in the future.

  • You were centering the camera on the player at the beginning of the scene only. That meant that the camera did not center for the rest of the time. I put it be always happen, ( I don’t know if you had meant to do that, But, I still did it as I was not able to see if the problem was solved )

  • I found the if you move the mouse close to the player (Which should stop the player from moving) ,the angle of the player resets and not stay in that same angle, which is a bit annoying. Sorry, I didn’t get the time to fix that :roll_eyes:


  • Maybe, you should focus the movement of the meteor a bit to the player. Because, most of the time I was sitting there in space and seeing if one comes. I do not mean move all the meteor toward the player, but maybe like 20 degrees toward it and this should not be for all the meteor, it should be random.

  • The max speed of the meteor could be a bit more slow.

  • Maybe make the player move really slow toward the mouse if the mouse is pressed , So that players can align to stick to the meteor.

  • I prefer your controls, it is really easy. Maybe, also add an option to use a keyboard for people who prefer that.

  • I suggest mouse click to detach from the meteor, as I can play with one hand and also makes sense with the “Press mouse to move” suggestion that I made.

These are just suggestions from me. It is your decision to add it or not as it is your game :wink:

Here the link to the project with the changes I made, assets - Google Drive

If you have any problems with it, you can post it here. Hope it helps! :grinning: best of luck!


OH MY GOD! This is so amiazing! Thank you so much for help!! <3 I am analizing it roght now! Your sugestions are also great! :smiley: Thank you so much!

1 Like

Maybe refresh the page, because I have made some edits to the post

Yes, I saw you made changes :>

1 Like

ok, so I analized it, and did as you did in this tutorial, and everyting works execpt one thing: when player hits a meteor then insted of sticking to touched one, it sticks to oryginal meteor that spawns every other on the scene, do you have an idea maybe why this issue occured?

Delete the meteor that already exists. It happened when I tried too. I deleted it. I thought you added it for some testing purposes.

1 Like

oh! that makes sense, thanks ^^ I dodn’t know that actually XD it works pretty stiff, but it works! So I will try to upgrade the movement on my own now :slight_smile: thank you very much for help!