Drag And Drop How can I make an object jumping to player to a certain position?

Enes

Member
Right at the beginning of the game, there is an object that must jump to the player. However, it does this, but to the bottom of the player. What I want is, to jump to its head and not bottom. I already have changed the origin of both the player and the object but still not working. PLEASE HELP!!
 

FrostyCat

Member
Don't shift the origin, shift the target coordinate.

For example, if your player is 64 pixels tall and its origin is at the bottom, try X: obj_player.x and Y: obj_player.y-64, relative off.
 

Enes

Member
Don't shift the origin, shift the target coordinate.

For example, if your player is 64 pixels tall and its origin is at the bottom, try X: obj_player.x and Y: obj_player.y-64, relative off.
Ok it now works perfectly but one more question...how can I make the object that orbits the player move like in the solar system, where when the moon orbjts the earth, it is one time at the back of planet earth and when continuing to orbit, it gets in front of earth...would be sooo cool if one knows this
 

FrostyCat

Member
Ok it now works perfectly but one more question...how can I make the object that orbits the player move like in the solar system, where when the moon orbjts the earth, it is one time at the back of planet earth and when continuing to orbit, it gets in front of earth...would be sooo cool if one knows this
You could have easily used a search engine to find an answer for that, this question is one of the most repeated around here.

For starters, this post is directly referenced from the top result, and should be relatively straight-forward to adapt into GMS 2 D&D.
 
Top