SOLVED Problem with revolute joint

J

Joseph Moose

Guest
Hello, I have a physics tank game, that have turrets, which spin to mouse pointer. When tank hits the wall, turret goes a little ahead and stops. if I no longer hold the button, tower will return to where it should be. I need the turret to be every time in center of tank. When i add this phy_position_x = tank.phy_position_x; phy_position_y = tank.phy_position_y; to turret step event, it works fine, but when i move tank, turret will move after a while.
My code of the joint create:physics_joint_revolute_create(id,turret,turret.x,turret.y,0,0,0,0,0,0,false);
For moving tank i use physics_apply_force.
 
Last edited by a moderator:
J

Joseph Moose

Guest
SOLVED

with this code :
GML:
physics_world_update_speed(room_speed * 2);
physics_world_update_iterations(30);
from this thread
 
Top