Carloskhard
Member
I'm making an space game where there are planets(circular planets) with platforms attached to them that spin with them by changing his phy_position and phy_rotation manually(GIF BELOW).
Works perfect BUT physics simulation gets broken: collisions work but friction between the ship and the platform which has landed on the platform don't, which makes the ship slides out of the platform as it rotates with the planet.
In other words: HOW can I move phy_position manually without breaking the simulation(So I can get friction working)?
EDIT: I've used a joint to attach the platform to the planet and works perfectly.
The code is simple for anyone interested:
However this solution works for this specific case, but I'm still curious on how to solve this for other cases. If anyone wants to help, ideas are welcome.
Works perfect BUT physics simulation gets broken: collisions work but friction between the ship and the platform which has landed on the platform don't, which makes the ship slides out of the platform as it rotates with the planet.
In other words: HOW can I move phy_position manually without breaking the simulation(So I can get friction working)?
EDIT: I've used a joint to attach the platform to the planet and works perfectly.
The code is simple for anyone interested:
GML:
"if(instance_exists(OBJTOATTACHTO)) physics_joint_revolute_create(id, OBJTOTATTACHTO, x, y, 0,0,false,false)".
Last edited: