Messages related to the Physics module.

Static variables

@:value(new Message<PhysicsMessageApplyForce>("apply_force"))staticread onlyapply_force:Message<PhysicsMessageApplyForce> = new Message<PhysicsMessageApplyForce>("apply_force")

Applies a force on a collision object.

Post this message to a collision-object-component to apply the specified force on the collision object. The collision object must be dynamic.

@:value(new Message<PhysicsMessageCollisionResponse>("collision_response"))staticread onlycollision_response:Message<PhysicsMessageCollisionResponse> = new Message<PhysicsMessageCollisionResponse>("collision_response")

Reports a collision between two collision objects.

This message is broadcasted to every component of an instance that has a collision object, when the collision object collides with another collision object. For a script to take action when such a collision happens, it should check for this message in its on_message callback function.

This message only reports that a collision actually happened and will only be sent once per colliding pair and frame. To retrieve more detailed information, check for the contact_point_response instead.

@:value(new Message<PhysicsMessageContactPointResponse>("contact_point_response"))staticread onlycontact_point_response:Message<PhysicsMessageContactPointResponse> = new Message<PhysicsMessageContactPointResponse>("contact_point_response")

Reports a contact point between two collision objects.

This message is broadcasted to every component of an instance that has a collision object, when the collision object has contact points with respect to another collision object. For a script to take action when such contact points occur, it should check for this message in its on_message callback function.

Since multiple contact points can occur for two colliding objects, this message can be sent multiple times in the same frame for the same two colliding objects. To only be notified once when the collision occurs, check for the collision_response message instead.

@:value(new Message<PhysicsMessageRayCastMissed>("ray_cast_missed"))staticread onlyray_cast_missed:Message<PhysicsMessageRayCastMissed> = new Message<PhysicsMessageRayCastMissed>("ray_cast_missed")

Reports a ray cast miss.

This message is sent back to the sender of a ray_cast_request, if the ray didn't hit any collision object. See Physics.raycast_async for examples of how to use it.

@:value(new Message<PhysicsMessageRayCastResponse>("ray_cast_response"))staticread onlyray_cast_response:Message<PhysicsMessageRayCastResponse> = new Message<PhysicsMessageRayCastResponse>("ray_cast_response")

Reports a ray cast hit.

This message is sent back to the sender of a ray_cast_request, if the ray hit a collision object. See Physics.raycast_async for examples of how to use it.

@:value(new Message<Void>("request_velocity"))staticread onlyrequest_velocity:Message<Void> = new Message<Void>("request_velocity")

Deprecated: "Read properties `linear_velocity` and `angular_velocity` with `Go.get` instead."

(DEPRECATED) requests the velocity of a collision object.

Post this message to a collision-object-component to retrieve its velocity.

@:value(new Message<PhysicsMessageTriggerResponse>("trigger_response"))staticread onlytrigger_response:Message<PhysicsMessageTriggerResponse> = new Message<PhysicsMessageTriggerResponse>("trigger_response")

Reports interaction (enter/exit) between a trigger collision object and another collision object.

This message is broadcasted to every component of an instance that has a collision object, when the collision object interacts with another collision object and one of them is a trigger. For a script to take action when such an interaction happens, it should check for this message in its on_message callback function.

This message only reports that an interaction actually happened and will only be sent once per colliding pair and frame. To retrieve more detailed information, check for the contact_point_response instead.

@:value(new Message<PhysicsMessageVelocityResponse>("velocity_response"))staticread onlyvelocity_response:Message<PhysicsMessageVelocityResponse> = new Message<PhysicsMessageVelocityResponse>("velocity_response")

Deprecated: "Read properties `linear_velocity` and `angular_velocity` with `Go.get` instead."

(DEPRECATED) reports the velocity of a collision object.

See request_velocity for examples on how to use it.

This message is sent back to the sender of a request_velocity message.