Finished documentation
Finished documentation on sprite physics and joints Fixed some bugs in sprite physics Added safety checks for joint types Added code to free up joints when a canvas is destroyed
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
#title applySpriteAngularImpulse [RCBasic Doc]
|
||||
#header sub applySpriteAngularImpulse( spr_id, impulse)
|
||||
|
||||
Apply an angular impulse to a body. This method affects the body’s rotational motion, changing its angular velocity based on the impulse applied.
|
||||
|
||||
#ref ApplySpriteLinearImpulse
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title applySpriteCentralForce [RCBasic Doc]
|
||||
#header sub applySpriteCentralForce( spr_id, x, y)
|
||||
|
||||
|
||||
Apply a continuous force to a body at its center of mass, regardless of the body's current orientation. This method affects the body's linear motion and is useful for simulating forces like gravity, wind, or any other directional force.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title applySpriteForce [RCBasic Doc]
|
||||
#header sub applySpriteForce( spr_id, fX, fY, pX, pY)
|
||||
|
||||
|
||||
Apply a force at a world point. If the force is not applied at the center of mass, it will generate a torque and affect the angular velocity. This wakes up the body.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title applySpriteLinearImpulse [RCBasic Doc]
|
||||
#header sub applySpriteLinearImpulse( spr_id, iX, iY, pX, pY)
|
||||
|
||||
Apply an instantaneous linear impulse to a body. This method directly affects the body’s linear motion by changing its velocity based on the impulse applied.
|
||||
|
||||
#ref ApplySpriteAngularImpulse
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title applySpriteTorque [RCBasic Doc]
|
||||
#header sub applySpriteTorque( spr_id, torque)
|
||||
|
||||
|
||||
Apply a torque. This affects the angular velocity without affecting the linear velocity of the center of mass.
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#title createDistanceJoint [RCBasic Doc]
|
||||
#header function createDistanceJoint( spriteA, spriteB, aX, aY, bX, bY)
|
||||
#header function createDistanceJoint( spriteA, spriteB, aX, aY, bX, bY, collide_connect)
|
||||
|
||||
Creates a distance joint
|
||||
|
||||
A distance joint constrains two points on two bodies to remain at a fixed distance from each other. You can view this as a massless, rigid rod.
|
||||
|
||||
Parameters
|
||||
#list ul
|
||||
#li spriteA - first body
|
||||
#li spriteB - second body
|
||||
#li aX, aY - Anchor point on spriteA
|
||||
#li bX, bY - Anchor point on spriteB
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#title createFrictionJoint [RCBasic Doc]
|
||||
#header function createFrictionJoint( spriteA, spriteB, x, y)
|
||||
#header function createFrictionJoint( spriteA, spriteB, x, y, collide_connect)
|
||||
|
||||
Creates a Friction Joint
|
||||
|
||||
Friction joint. This is used for top-down friction. It provides 2D translational friction and angular friction.
|
||||
|
||||
Parameters
|
||||
#list ul
|
||||
#li spriteA - first body
|
||||
#li spriteB - second body
|
||||
#li x, y - Anchor point. A common world-space point where the friction forces will be applied on both bodies. This is usually set to the point where you want the bodies to "grip" or resist slipping relative to each other.
|
||||
#/list
|
||||
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#title createGearJoint [RCBasic Doc]
|
||||
#header function createGearJoint( jointA, jointB, g_ratio)
|
||||
#header function createGearJoint( jointA, jointB, g_ratio, collide_connect)
|
||||
|
||||
Creates a Gear Joint
|
||||
|
||||
A gear joint is used to connect two joints together. Either joint can be a revolute or prismatic joint. You specify a gear ratio to bind the motions together: coordinate1 + ratio * coordinate2 = constant The ratio can be negative or positive. If one joint is a revolute joint and the other joint is a prismatic joint, then the ratio will have units of length or units of 1/length.
|
||||
|
||||
Parameters
|
||||
#list ul
|
||||
#li spriteA - first body
|
||||
#li spriteB - second body
|
||||
#li ratio - ratio of how much influence jointA has compared to jointB
|
||||
#/list
|
||||
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title createMotorJoint [RCBasic Doc]
|
||||
#header function createMotorJoint( spriteA, spriteB)
|
||||
#header function createMotorJoint( spriteA, spriteB, collide_connect)
|
||||
|
||||
Creates a Motor Joint
|
||||
|
||||
A motor joint is used to control the relative motion between two bodies. A typical usage is to control the movement of a dynamic body with respect to the ground.
|
||||
|
||||
@@ -1,4 +1,14 @@
|
||||
#title createPrismaticJoint [RCBasic Doc]
|
||||
#header function createPrismaticJoint( spriteA, spriteB, aX, aY, axisX, axisY)
|
||||
#header function createPrismaticJoint( spriteA, spriteB, aX, aY, axisX, axisY, collide_connect)
|
||||
|
||||
Creates a Prismatic Joint
|
||||
|
||||
A prismatic joint. This joint provides one degree of freedom: translation along an axis fixed in bodyA. Relative rotation is prevented. You can use a joint limit to restrict the range of motion and a joint motor to drive the motion or to model joint friction.
|
||||
|
||||
Parameters
|
||||
#list ul
|
||||
#li spriteA - first body
|
||||
#li spriteB - second body
|
||||
#li aX, aY - anchor point
|
||||
#li axisX, axisY - Used to define a linear direction from anchor point
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title createPulleyJoint [RCBasic Doc]
|
||||
#header function createPulleyJoint( spriteA, spriteB, gaX, gaY, gbX, gbY, aX, aY, bX, bY, j_ratio)
|
||||
#header function createPulleyJoint( spriteA, spriteB, gaX, gaY, gbX, gbY, aX, aY, bX, bY, j_ratio, collide_connect)
|
||||
|
||||
Creates a pulley joint
|
||||
|
||||
The pulley joint is connected to two bodies and two fixed ground points. The pulley supports a ratio such that: length1 + ratio * length2 <= constant Yes, the force transmitted is scaled by the ratio. Warning: the pulley joint can get a bit squirrelly by itself. They often work better when combined with prismatic joints. You should also cover the the anchor points with static shapes to prevent one side from going to zero length.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title createRevoluteJoint [RCBasic Doc]
|
||||
#header function createRevoluteJoint( spriteA, spriteB, x, y)
|
||||
#header function createRevoluteJoint( spriteA, spriteB, x, y, collide_connect)
|
||||
|
||||
Creates a revolute joint
|
||||
|
||||
A revolute joint constrains two bodies to share a common point while they are free to rotate about the point. The relative rotation about the shared point is the joint angle. You can limit the relative rotation with a joint limit that specifies a lower and upper angle. You can use a motor to drive the relative rotation about the shared point. A maximum motor torque is provided so that infinite forces are not generated.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title createWeldJoint [RCBasic Doc]
|
||||
#header function createWeldJoint( spriteA, spriteB, x, y)
|
||||
#header function createWeldJoint( spriteA, spriteB, x, y, collide_connect)
|
||||
|
||||
Creates a Weld Joint
|
||||
|
||||
A weld joint essentially glues two bodies together. A weld joint may distort somewhat because the island constraint solver is approximate.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title createWheelJoint [RCBasic Doc]
|
||||
#header function createWheelJoint( spriteA, spriteB, aX, aY, axisX, axisY)
|
||||
#header function createWheelJoint( spriteA, spriteB, aX, aY, axisX, axisY, collide_connect)
|
||||
|
||||
Creates a wheel joint.
|
||||
|
||||
A wheel joint. This joint provides two degrees of freedom: translation along an axis fixed in bodyA and rotation in the plane. In other words, it is a point to line constraint with a rotational motor and a linear spring/damper. The spring/damper is initialized upon creation. This joint is designed for vehicle suspensions.
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title enableJointLimit [RCBasic Doc]
|
||||
#header sub enableJointLimit( joint_id, flag)
|
||||
|
||||
Enables or disables joint limits
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref JointIsLimitEnabled SetJointLimits
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title enableJointMotor [RCBasic Doc]
|
||||
#header sub enableJointMotor( joint_id, flag)
|
||||
|
||||
Enables or disables the joint motor
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref JointMotorIsEnabled
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#title getActorVelocityInLocalPoint [RCBasic Doc]
|
||||
#header sub getActorVelocityInLocalPoint( actor, rel_x, rel_y, rel_z, ByRef x, ByRef y, ByRef z)
|
||||
|
||||
Gets the linear velocity of a specific point on an actor, given its position in the actor's local coordinate space. This is useful for determining how fast and in what direction a particular point on the actor is moving, accounting for both the body's linear velocity and its rotational motion (angular velocity).
|
||||
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title getJointAngle [RCBasic Doc]
|
||||
#header function getJointAngle( joint_id)
|
||||
|
||||
Returns the current joint angle
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointAngularOffset [RCBasic Doc]
|
||||
#header function getJointAngularOffset( joint_id)
|
||||
|
||||
Returns the target angular offset
|
||||
|
||||
Used with Motor Joint
|
||||
|
||||
#ref SetJointAngularOffset
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getJointAngularSpeed [RCBasic Doc]
|
||||
#header function getJointAngularSpeed( joint_id)
|
||||
|
||||
Return the current joint angular speed
|
||||
|
||||
Used with Wheel Joint
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#title getJointCorrectionFactor [RCBasic Doc]
|
||||
#header function getJointCorrectionFactor( joint_id)
|
||||
|
||||
Returns a factor for how quickly the joint corrects deviations from its target position and rotation. This correction factor determines the responsiveness of the motor joint in achieving the desired linear and angular offsets between two connected bodies.
|
||||
|
||||
Used with Motor Joints
|
||||
|
||||
#ref GetJointCorrectionFactor
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointCurrentLength [RCBasic Doc]
|
||||
#header function getJointCurrentLength( joint_id)
|
||||
|
||||
Returns the current distance between BodyA and BodyB
|
||||
|
||||
Used with Distance Joint
|
||||
|
||||
#ref GetJointLength
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointCurrentLengthA [RCBasic Doc]
|
||||
#header function getJointCurrentLengthA( joint_id)
|
||||
|
||||
Return the current length of the segment attached to bodyA.
|
||||
|
||||
Used with Pulley Joint
|
||||
|
||||
#ref GetJointCurrentLengthB
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointCurrentLengthB [RCBasic Doc]
|
||||
#header function getJointCurrentLengthB( joint_id)
|
||||
|
||||
Return the current length of the segment attached to bodyB.
|
||||
|
||||
Used with Pulley Joint
|
||||
|
||||
#ref GetJointCurrentLengthA
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title getJointDamping [RCBasic Doc]
|
||||
#header function getJointDamping( joint_id)
|
||||
|
||||
Returns the damping value for a joint
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointDamping
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointGroundAnchorA [RCBasic Doc]
|
||||
#header sub getJointGroundAnchorA( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Gets the first ground anchor
|
||||
|
||||
Used with Pulley Joint
|
||||
|
||||
#ref GetJointGroundAnchorB
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointGroundAnchorB [RCBasic Doc]
|
||||
#header sub getJointGroundAnchorB( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Gets the second ground anchor
|
||||
|
||||
Used with Pulley Joint
|
||||
|
||||
#ref GetJointGroundAnchorA
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#title getJointLength [RCBasic Doc]
|
||||
#header function getJointLength( joint_id)
|
||||
|
||||
Returns the Joint Length
|
||||
|
||||
Used with distance Joints
|
||||
|
||||
#ref SetJointLength
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointLengthA [RCBasic Doc]
|
||||
#header function getJointLengthA( joint_id)
|
||||
|
||||
Returns the current length of the line connecting the anchor point on the first body to its corresponding ground anchor. This length can vary based on the movement of the connected bodies.
|
||||
|
||||
Used with Pulley Joints
|
||||
|
||||
#ref GetJointLengthB
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointLengthB [RCBasic Doc]
|
||||
#header function getJointLengthB( joint_id)
|
||||
|
||||
Returns the current length of the line connecting the anchor point on the second body to its corresponding ground anchor. This length can vary based on the movement of the connected bodies.
|
||||
|
||||
Used with Pulley Joints
|
||||
|
||||
#ref GetJointLengthA
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointLinearOffset [RCBasic Doc]
|
||||
#header sub getJointLinearOffset( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Gets the target position offset for the connected bodies relative to each other.
|
||||
|
||||
Used with Motor Joints
|
||||
|
||||
#ref SetJointLinearOffset
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getJointLinearSpeed [RCBasic Doc]
|
||||
#header function getJointLinearSpeed( joint_id)
|
||||
|
||||
Returns the current joint linear speed, usually in meters per second.
|
||||
|
||||
Used with Wheel Joint
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
#title getJointLocalAnchorA [RCBasic Doc]
|
||||
#header sub getJointLocalAnchorA( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Returns the local anchor point relative to bodyA's origin.
|
||||
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Friction Joint
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointLocalAnchorB
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
#title getJointLocalAnchorB [RCBasic Doc]
|
||||
#header sub getJointLocalAnchorB( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Returns the local anchor point relative to bodyB's origin.
|
||||
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Friction Joint
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointLocalAnchorA
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
#title getJointLocalAxisA [RCBasic Doc]
|
||||
#header sub getJointLocalAxisA( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Gets the local joint axis relative to bodyA
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title getJointLowerLimit [RCBasic Doc]
|
||||
#header function getJointLowerLimit( joint_id)
|
||||
|
||||
Get the lower joint translation limit, usually in meters.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointUpperLimit
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title getJointMaxForce [RCBasic Doc]
|
||||
#header function getJointMaxForce( joint_id)
|
||||
|
||||
Return the maximum friction force in N.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Friction Joint
|
||||
#li Motor Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointMaxLength [RCBasic Doc]
|
||||
#header function getJointMaxLength( joint_id)
|
||||
|
||||
Returns the maximum length
|
||||
|
||||
Used with Distance Joint
|
||||
|
||||
#ref GetJointMinLength
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointMaxMotorForce [RCBasic Doc]
|
||||
#header function getJointMaxMotorForce( joint_id)
|
||||
|
||||
Returns the maximum linear force that the motor can apply to achieve the target speed set by SetMotorSpeed. This allows you to control the power or strength of the motor along the joint’s axis.
|
||||
|
||||
Used with Prismatic Joint
|
||||
|
||||
#ref SetJointMaxMotorForce
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title getJointMaxMotorTorque [RCBasic Doc]
|
||||
#header function getJointMaxMotorTorque( joint_id)
|
||||
|
||||
Returns the maximum torque (rotational force) that the motor can apply to achieve the target motor speed set by SetMotorSpeed. This allows you to control how much power the motorized joint has.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointMaxMotorTorque
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title getJointMaxTorque [RCBasic Doc]
|
||||
#header function getJointMaxTorque( joint_id)
|
||||
|
||||
Returns the upper limit on the amount of torque (rotational force) the joint can apply, controlling how much rotational resistance or power the joint provides.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Friction Joint
|
||||
#li Motor Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointMaxTorque
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointMinLength [RCBasic Doc]
|
||||
#header function getJointMinLength( joint_id)
|
||||
|
||||
Returns the minimum length
|
||||
|
||||
Used with Distance Joint
|
||||
|
||||
#ref GetJointMaxLength
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointMotorForce [RCBasic Doc]
|
||||
#header function getJointMotorForce( joint_id, inv_dt)
|
||||
|
||||
Return the current motor force given the inverse time step, usually in N.
|
||||
|
||||
Used with Prismatic Joint
|
||||
|
||||
#ref SetJointMotorForce
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title getJointMotorSpeed [RCBasic Doc]
|
||||
#header function getJointMotorSpeed( joint_id)
|
||||
|
||||
Returns the motor speed
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointMotorSpeed
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title getJointMotorTorque [RCBasic Doc]
|
||||
#header function getJointMotorTorque( joint_id, inv_dt)
|
||||
|
||||
Returns the current motor torque given the inverse time step. Unit is N*m.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointMaxMotorTorque SetJointMaxMotorTorque
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title getJointRatio [RCBasic Doc]
|
||||
#header function getJointRatio( joint_id)
|
||||
|
||||
Returns the gear/pulley ratio
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Gear Joint
|
||||
#li Pulley Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointRatio
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
#title getJointReactionForce [RCBasic Doc]
|
||||
#header sub getJointReactionForce( joint_id, inv_dt, ByRef x, ByRef y)
|
||||
|
||||
Returns the reaction force on bodyB at the joint anchor in Newtons.
|
||||
|
||||
Can be used with all joints
|
||||
|
||||
#ref GetJointReactionTorque
|
||||
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointReactionTorque [RCBasic Doc]
|
||||
#header function getJointReactionTorque( joint_id, inv_dt)
|
||||
#header function getJointReactionTorque( joint_id, inv_dt)
|
||||
|
||||
Returns the reaction torque on bodyB in N*m
|
||||
|
||||
Can be used with all joints
|
||||
|
||||
#ref GetJointReactionForce
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title getJointReferenceAngle [RCBasic Doc]
|
||||
#header function getJointReferenceAngle( joint_id)
|
||||
|
||||
Returns the reference angle.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title getJointSpeed [RCBasic Doc]
|
||||
#header function getJointSpeed( joint_id)
|
||||
|
||||
Returns the current joint angle speed
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title getJointStiffness [RCBasic Doc]
|
||||
#header function getJointStiffness( joint_id)
|
||||
|
||||
Returns spring stiffness
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref SetJointStiffness
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title getJointTranslation [RCBasic Doc]
|
||||
#header function getJointTranslation( joint_id)
|
||||
|
||||
Returns the current joint translation, usually in meters.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title getJointUpperLimit [RCBasic Doc]
|
||||
#header function getJointUpperLimit( joint_id)
|
||||
|
||||
Get the upper joint translation limit, usually in meters.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointLowerLimit
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointWorldAnchorA [RCBasic Doc]
|
||||
#header sub getJointWorldAnchorA( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Get the anchor point on bodyA in world coordinates.
|
||||
|
||||
Can be used with all joints
|
||||
|
||||
#ref GetJointWorldAnchorB
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title getJointWorldAnchorB [RCBasic Doc]
|
||||
#header sub getJointWorldAnchorB( joint_id, ByRef x, ByRef y)
|
||||
|
||||
Get the anchor point on bodyB in world coordinates.
|
||||
|
||||
Can be used with all joints
|
||||
|
||||
#ref GetJointWorldAnchorA
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getSpriteAngularDamping [RCBasic Doc]
|
||||
#header function getSpriteAngularDamping( spr_id)
|
||||
|
||||
Returns a sprite's angular damping
|
||||
|
||||
#ref ApplySpriteAngularDamping
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteAngularVelocity [RCBasic Doc]
|
||||
#header function getSpriteAngularVelocity( spr_id)
|
||||
|
||||
|
||||
Returns the angular velocity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteCenter [RCBasic Doc]
|
||||
#header sub getSpriteCenter( spr_id, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Returns a sprites center of mass
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getSpriteGravityScale [RCBasic Doc]
|
||||
#header function getSpriteGravityScale( spr_id)
|
||||
|
||||
Returns a sprite's gravity scale
|
||||
|
||||
#ref SetSpriteGravityScale
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteInertia [RCBasic Doc]
|
||||
#header function getSpriteInertia( spr_id)
|
||||
|
||||
|
||||
Returns the rotational inertia of the body about the local origin.
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getSpriteLinearDamping [RCBasic Doc]
|
||||
#header function getSpriteLinearDamping( spr_id)
|
||||
|
||||
Returns a sprite's linear damping value
|
||||
|
||||
#ref SetSpriteLinearDamping
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title getSpriteLinearVelocity [RCBasic Doc]
|
||||
#header sub getSpriteLinearVelocity( spr_id, ByRef x, ByRef y)
|
||||
|
||||
Gets the linear velocity of a sprite
|
||||
|
||||
#ref SetSpriteLinearVelocity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteLinearVelocityFromLocalPoint [RCBasic Doc]
|
||||
#header sub getSpriteLinearVelocityFromLocalPoint( spr_id, pX, pY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Get the world velocity of a local point.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteLinearVelocityFromWorldPoint [RCBasic Doc]
|
||||
#header sub getSpriteLinearVelocityFromWorldPoint( spr_id, wX, wY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Get the world linear velocity of a world point attached to this body.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteLocalPoint [RCBasic Doc]
|
||||
#header sub getSpriteLocalPoint( spr_id, wX, wY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Gets a local point relative to the body's origin given a world point.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteLocalVector [RCBasic Doc]
|
||||
#header sub getSpriteLocalVector( spr_id, wX, wY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Gets a local vector given a world vector.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteMass [RCBasic Doc]
|
||||
#header function getSpriteMass( spr_id)
|
||||
|
||||
|
||||
Returns the total mass of the body.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteWorldPoint [RCBasic Doc]
|
||||
#header sub getSpriteWorldPoint( spr_id, lX, lY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Get the world coordinates of a point given the local coordinates.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title getSpriteWorldVector [RCBasic Doc]
|
||||
#header sub getSpriteWorldVector( spr_id, lX, lY, ByRef x, ByRef y)
|
||||
|
||||
|
||||
Get the world coordinates of a vector given the local coordinates.
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title jointIsLimitEnabled [RCBasic Doc]
|
||||
#header function jointIsLimitEnabled( joint_id)
|
||||
|
||||
Returns whether or not the joint limit is enabled
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref EnableJointLimit SetJointLimits
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title jointMotorIsEnabled [RCBasic Doc]
|
||||
#header function jointMotorIsEnabled( joint_id)
|
||||
|
||||
Returns whether or not the joint motor is enabled
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref EnableJointMotor
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointAngularOffset [RCBasic Doc]
|
||||
#header sub setJointAngularOffset( joint_id, angleOffset)
|
||||
|
||||
Set the target angular offset
|
||||
|
||||
Used with Motor Joint
|
||||
|
||||
#ref GetJointAngularOffset
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointCorrectionFactor [RCBasic Doc]
|
||||
#header sub setJointCorrectionFactor( joint_id, factor)
|
||||
|
||||
Sets how quickly the joint corrects deviations from its target position and rotation. This correction factor determines the responsiveness of the motor joint in achieving the desired linear and angular offsets between two connected bodies.
|
||||
|
||||
Used with Motor Joints
|
||||
|
||||
#ref GetJointCorrectionFactor
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title setJointDamping [RCBasic Doc]
|
||||
#header sub setJointDamping( joint_id, damping)
|
||||
|
||||
Sets the damping value for a joint
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointDamping
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointLength [RCBasic Doc]
|
||||
#header sub setJointLength( joint_id, jlen)
|
||||
|
||||
Set the fixed distance between two connected bodies. This distance acts as a "target length" that the joint will try to maintain, applying forces to keep the bodies at that separation.
|
||||
|
||||
Used with distance Joints
|
||||
|
||||
#ref GetJointLength
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title setJointLimits [RCBasic Doc]
|
||||
#header sub setJointLimits( joint_id, lower_limit, upper_limit)
|
||||
|
||||
Sets the minimum and maximum limits, restricting how far or how much rotation the connected bodies can move relative to each other.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointLowerLimit GetJointUpperLimit
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointLinearOffset [RCBasic Doc]
|
||||
#header sub setJointLinearOffset( joint_id, x, y)
|
||||
|
||||
Specify a target position offset for the connected bodies relative to each other.
|
||||
|
||||
Used with Motor Joints
|
||||
|
||||
#ref GetJointLinearOffset
|
||||
|
||||
@@ -1,4 +1,10 @@
|
||||
#title setJointMaxForce [RCBasic Doc]
|
||||
#header sub setJointMaxForce( joint_id, force)
|
||||
|
||||
Sets an upper limit on the amount of force the joint can apply to the connected bodies, helping to control how much resistance or power the joint provides.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Motor Joint
|
||||
#li Friction Joint
|
||||
#/list
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointMaxLength [RCBasic Doc]
|
||||
#header sub setJointMaxLength( joint_id, jlen)
|
||||
|
||||
Set the maximum allowable length between two connected bodies
|
||||
|
||||
Used with Distance Joint
|
||||
|
||||
#ref SetJointMinLength
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointMaxMotorForce [RCBasic Doc]
|
||||
#header sub setJointMaxMotorForce( joint_id, force)
|
||||
|
||||
Limits the maximum linear force that the motor can apply to achieve the target speed set by SetMotorSpeed. This allows you to control the power or strength of the motor along the joint’s axis.
|
||||
|
||||
Used with Prismatic Joints
|
||||
|
||||
#ref GetJointMaxMotorForce
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title setJointMaxMotorTorque [RCBasic Doc]
|
||||
#header sub setJointMaxMotorTorque( joint_id, torque)
|
||||
|
||||
Limits the maximum torque (rotational force) that the motor can apply to achieve the target motor speed set by SetMotorSpeed. This allows you to control how much power the motorized joint has.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointMaxMotorTorque
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
#title setJointMaxTorque [RCBasic Doc]
|
||||
#header sub setJointMaxTorque( joint_id, torque)
|
||||
|
||||
Sets an upper limit on the amount of torque (rotational force) the joint can apply, controlling how much rotational resistance or power the joint provides.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Friction Joint
|
||||
#li Motor Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointMaxTorque
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointMinLength [RCBasic Doc]
|
||||
#header sub setJointMinLength( joint_id, jlen)
|
||||
|
||||
Set the minimum allowable length between two connected bodies
|
||||
|
||||
Used with Distance Joint
|
||||
|
||||
#ref SetJointMaxLength
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title setJointMotorSpeed [RCBasic Doc]
|
||||
#header sub setJointMotorSpeed( joint_id, speed)
|
||||
|
||||
Used on joints that support motors, such as revolute joints and prismatic joints, to control the speed at which the motor applies force to achieve movement.
|
||||
|
||||
Used with
|
||||
#list ul
|
||||
#li Prismatic Joint
|
||||
#li Revolute Joint
|
||||
#li Wheel Joint
|
||||
#/list
|
||||
|
||||
#ref GetJointMotorSpeed
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setJointOrigin [RCBasic Doc]
|
||||
#header sub setJointOrigin( joint_id, x, y)
|
||||
|
||||
Shift the world origin. This is particularly useful in large simulations where objects might move far from the initial origin, potentially causing precision issues in floating-point calculations.
|
||||
|
||||
Used with Pulley Joint
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setJointRatio [RCBasic Doc]
|
||||
#header sub setJointRatio( joint_id, j_ratio)
|
||||
|
||||
Determines how much one joint’s movement affects the other, enabling complex, synchronized motion.
|
||||
|
||||
Used with Gear Joints
|
||||
|
||||
#ref GetJointRatio
|
||||
|
||||
@@ -1,4 +1,13 @@
|
||||
#title setJointStiffness [RCBasic Doc]
|
||||
#header sub setJointStiffness( joint_id, stiffness)
|
||||
|
||||
Sets how rigid a joint is
|
||||
|
||||
Used with:
|
||||
#list ul
|
||||
#li Distance Joint
|
||||
#li Weld Joint
|
||||
#li Wheel Join
|
||||
#/list
|
||||
|
||||
#ref GetJointStiffness
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteAngularDamping [RCBasic Doc]
|
||||
#header sub setSpriteAngularDamping( spr_id, angularDamping)
|
||||
|
||||
Sets a sprite's angular damping
|
||||
|
||||
#ref GetSpriteAngularDamping
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteAngularVelocity [RCBasic Doc]
|
||||
#header sub setSpriteAngularVelocity( spr_id, av)
|
||||
|
||||
Sets the angular velocity of a sprite
|
||||
|
||||
#ref GetSpriteAngularVelocity
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#title setSpriteAwake [RCBasic Doc]
|
||||
#header sub setSpriteAwake( spr_id, flag)
|
||||
|
||||
|
||||
Sets a sprite's sleep state
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title setSpriteBullet [RCBasic Doc]
|
||||
#header sub setSpriteBullet( spr_id, flag)
|
||||
|
||||
Sets whether body has continuous collision detection
|
||||
|
||||
Note: Useful for fast moving objects
|
||||
|
||||
#ref SpriteIsBullet
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteFixedRotation [RCBasic Doc]
|
||||
#header sub setSpriteFixedRotation( spr_id, flag)
|
||||
#header sub setSpriteFixedRotation( spr_id, flag )
|
||||
|
||||
Prevents sprite from being rotated by any forces applied to it
|
||||
|
||||
#ref spriteIsFixedRotation
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteGravityScale [RCBasic Doc]
|
||||
#header sub setSpriteGravityScale( spr_id, g_scale)
|
||||
|
||||
Sets the affect of gravity on a sprite
|
||||
|
||||
#ref GetSpriteGravityScale
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteLinearDamping [RCBasic Doc]
|
||||
#header sub setSpriteLinearDamping( spr_id, linearDamping)
|
||||
|
||||
Sets the linear damping of a sprite
|
||||
|
||||
#ref GetSpriteLinearDamping
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteLinearVelocity [RCBasic Doc]
|
||||
#header sub setSpriteLinearVelocity( spr_id, x, y)
|
||||
|
||||
Sets a sprite's linear velocity
|
||||
|
||||
#ref GetSpriteLinearVelocity
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title setSpriteSleepAllowed [RCBasic Doc]
|
||||
#header sub setSpriteSleepAllowed( spr_id, flag)
|
||||
|
||||
Sets whether the sprite is allowed to go to sleep when it's at rest
|
||||
|
||||
#ref SetSpriteAwake SpriteIsAwake SpriteIsSleepAllowed
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title spriteIsAwake [RCBasic Doc]
|
||||
#header function spriteIsAwake( spr_id)
|
||||
|
||||
Wakes a sleeping sprite
|
||||
|
||||
#ref SetSpriteAwake SpriteIsSleepAllowed SetSpriteSleepAllowed
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
#title spriteIsBullet [RCBasic Doc]
|
||||
#header function spriteIsBullet( spr_id)
|
||||
|
||||
Returns whether body has continuous collision detection
|
||||
|
||||
Note: Useful for fast moving objects
|
||||
|
||||
#ref SetSpriteBullet
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title spriteIsFixedRotation [RCBasic Doc]
|
||||
#header function spriteIsFixedRotation( spr_id)
|
||||
|
||||
Returns whether fixed rotation is set on the sprite
|
||||
|
||||
#ref SetSpriteFixedRotation
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#title spriteSleepAllowed [RCBasic Doc]
|
||||
#header function spriteSleepAllowed( spr_id)
|
||||
|
||||
Whether the body is allowed to go to sleep when it's at rest
|
||||
|
||||
#ref SetSpriteSleepAllowed SpriteIsAwake SetSpriteAwake
|
||||
|
||||
Reference in New Issue
Block a user