Revision as of 18:20, 24 February 2013
This article is an overview of physics related constants and variables.
These variables work like regular speed and direction and you can set them through code, they exist in all physics objects:
Read Only Variables
Some variables are changed internally by the engine but not able to be change directly by you, the end programmer:
Collision Only Variables
Temporary variables in physics objects that can only be used in the collision event. Like the ones above and read-only:
phy_joint_anchor_1_x (x, y) coordinate of the first anchor of the joint phy_joint_anchor_1_y phy_joint_anchor_2_x (x, y) coordinate of the second anchor of the joint phy_joint_anchor_2_y phy_joint_reaction_force_x (x, y) reaction force applied to the second instance of a joint at the anchor coordinate phy_joint_reaction_force_y phy_joint_reaction_torque torque applied to the second instance of a joint at the anchor position
phy_joint_max_motor_force maxmimum force for a motor, when it was created phy_joint_max_motor_torque maximum torque for a motor, when it was created phy_joint_motor_force current force of a motor phy_joint_motor_speed current speed of a motor phy_joint_motor_torque current torque of a motor
phy_joint_angle Angle created by the two anchor points of the joint. Calculated using the coordinates of the physics world, not using the room coordinates.
phy_joint_translation Gets the distance between the anchor coordinates or the local (x, y) coordinates. phy_joint_speed Current movement speed of a joint.
phy_joint_length_1 Length of the joint from the first local coordinate (x, y) to the first anchor coordinate. phy_joint_length_2 Length of the joint from the second local coordinate (x, y) to the second anchor coordinate.
phy_joint_damping_ratio Damping ratio of a joint, is how "springy" it reacts and is non dimensional. It is usually between zero and one, at one being critical meaning all oscillations will vanish, but can be larger than one. phy_joint_frequency Oscillation frequency of a joint in hertz, usually should be less than half of the time step, set with the function [[physics_world_update_speed]], and you can also change this variable.