acidemic
Member
I am using the following code to attach wheels to a car:
The problem is that when wheel bumps into an obstacle at higher speed it tends to move against the 'x' axis when it shouldn't do this as 'axis_x' is set to '0'.
Screenshot:
And rear wheel at reverse speed:
Can this be fixed may be by creating some additional joints which would hard fix wheels at 'x' axis?
I am working now in GMS 2, but the same issue was in GMS 1.4.
Code:
tire_rear = instance_create (x+rear_wheel_x, y+rear_wheel_y, rear_wheel_type);
physics_joint_wheel_create(id, tire_rear, tire_rear.x, tire_rear.y, 0, 1, false, 0, 0, wheel_joint_freq_hz, wheel_joint_damping_ratio, false);
tire_front = instance_create (x+front_wheel_x, y+front_wheel_y, front_wheel_type);
physics_joint_wheel_create(id, tire_front, tire_front.x, tire_front.y, 0, 1, false, 0, 0, wheel_joint_freq_hz, wheel_joint_damping_ratio, false);
Screenshot:
And rear wheel at reverse speed:
Can this be fixed may be by creating some additional joints which would hard fix wheels at 'x' axis?
I am working now in GMS 2, but the same issue was in GMS 1.4.