Addon ID

  • mikal_cannon_3d_physics

Info

Statistics

  • Download count265 total downloads
  • Latest download count 150 downloads of latest version
  • Average download count3 downloads per day average

Owners

A list of all Actions, Conditions and Expressions supported in this addon.

General

  • Actions

    {my}: Cast ray , tag {0} from {1},{2},{3} to {4},{5},{6} {7}, {8}, {9} {10}

    Cast ray from x0,y0,z0 to x1,y1,z1.

    {my}: Cast shape, tag {0}, shape {1} (H:{2}, W:{3}, D:{4}) from {5},{6},{7} to {8},{9},{10}, rotation {11}°X, {12}°Y, {13}°Z, max ToI {14}, hit margin {15}, filter groups {16}, exclude UID {17}, skip backfaces {18}

    Cast a shape from a point in a given direction.

  • Conditions

    {my}: On any raycast result

    On any raycast result.

    {my}: On raycast result {0}

    On raycast result.

    {my}: On any cast shape result

    Triggered on any cast shape result.

    {my}: On cast shape result {0}

    Triggered on cast shape result with the specified tag.

    {my}: On physics ready

    Triggered when physics is ready for this body.

  • Expressions

    RaycastResultAsJSON

    Raycast result as JSON string.

    CastShapeResultAsJSON

    Cast shape result as JSON string.

World

  • Actions

    {my}: Set world gravity {0},{1},{2}

    Set world gravity in x,y,z axis.

    Set {my} timestep {0}, {1}

    Set timestep mode [and value].

    Set {my} default linear damping to {0}

    Set default linear damping

    Enable {my} debug render {0} width {1}

    Enable debug render.

    Set {my} world scale to {0}

    Set world scale.

    {my}: Pause physics

    Pause the physics simulation. Bodies keep their positions.

    {my}: Resume physics

    Resume the physics simulation.

  • Conditions

    {my}: On physics paused

    Triggered when physics simulation is paused.

    {my}: is physics paused

    True when the physics simulation is paused.

  • Expressions

    WorldGravityX

    World gravity x vector.

    WorldGravityY

    World gravity y vector.

    WorldGravityZ

    World gravity z vector.

Body

  • Actions

    Set {my} immovable {0}

    Set body immovable.

    Set {my} linear damping to {0}

    Set linear damping

    Set {my} restitution to {0}

    Set the restitution (bounciness) of a body.

    Set {my} friction to {0}

    Set the friction of a body.

    Set {my} position offset to {0},{1},{2}

    Set position offset of object from body

    Set {my} angular damping to {0}

    Set angular damping

    Set {my} velocity {0}, {1} , {2}

    Set velocity to body.

    Set {my} body type to {0}

    Switch body type at runtime (Dynamic, Fixed, Kinematic).

    Move {my} kinematic body to {0}, {1}, {2}

    Move a kinematic body to a position. Unlike Translate, this lets Rapier compute velocity for correct collision response with dynamic bodies.

    Rotate {my} kinematic body to {0}°, {1}°, {2}°

    Rotate a kinematic body. Unlike Rotate, this lets Rapier compute angular velocity for correct collision response with dynamic bodies.

    Set {my} angular velocity to {0}, {1}, {2} (rad/s)

    Set angular velocity of body (rad/s).

    Enable {my} physics {0}

    Enable body physics.

    Apply {my} impulse {0}, {1} , {2} to relative {3}, {4}, {5}

    Apply impulse to body at relative point.

    Set {my} mass {0}

    Set mass of body.

    Set {my} CCD {0}

    Set Continuous Collision Detection (CCD) for body.

    Set {my} enabled rotations X:{0} Y:{1} Z:{2}

    Lock or unlock rotation axes. Set false to prevent rotation on that axis.

    Set {my} enabled translations X:{0} Y:{1} Z:{2}

    Lock or unlock translation axes. Set false to pin the body on that axis.

    Set {my} gravity scale to {0}

    Set per-body gravity scale. 1.0 = normal, 0.0 = weightless, 2.0 = double gravity.

    Apply {my} angular impulse {0}, {1}, {2}

    Apply an instantaneous rotational impulse to a body (one-shot, unlike ApplyTorque which is per-step).

    Wake up {my}

    Force a sleeping body to wake up and resume physics simulation.

    Put {my} to sleep

    Force a body to sleep, pausing its physics simulation until woken.

    Set {my} collision groups {0}

    Set collision groups of body, power of 2, each bit is a group.

    Set {my} collision groups membership:{0}, filter:{1}

    Set collision groups membership and filter with hex strings.

    Set {my} collision filter mask {0}

    Set collision filter mask of body.

    Apply {my} force {0}, {1} , {2} to relative {3}, {4}, {5}

    Apply force to body at relative point.

    Apply {my} torque {0}, {1} , {2}

    Apply torque to body.

    {my} Attach spring {0} to uid {1}, length {2}, stiffness {3}, damping {4}, {5}, {6}, {7}, {8}, {9}, {10}

    Attach spring from this body to another body.

    Update {my} body from render

    Update body from render.

    {my} create character controller {0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11} {12}

    Create character controller.

    {my} translate to {0}, {1}, {2}

    Translate body to x,y,z.

    {my} rotate to {0}, {1}, {2}

    Rotate body to x,y,z.

    {my} Translate character controller to {1}, {2}, {3}, tag {0}

    Translate character controller.

    Add {my} spherical joint to uid {6} at {0}, {1}, {2} to {3}, {4}, {5}

    Add spherical joint between self and target.

    Add {my} revolute joint to uid {6} at {0}, {1}, {2} to {3}, {4}, {5} with axis {7}, {8}, {9}

    Add revolute joint between self and target.

    {my}: Set revolute motor to uid {0} vel {1} force {2}

    Drive a revolute joint at a target angular velocity. Set max force to 0 to disable.

    {my}: Set revolute limits to uid {0} [{1}°, {2}°] {3}

    Set angular limits on a revolute joint.

    {my} enable {0} set size override to height {1}, width {2}, depth {3}

    Set size override for height, width, and depth.

  • Conditions

    {my}: is enabled

    is physics enabled.

    {my}: is immovable

    is immovable.

    {my}: On collision

    On body physics collision.

    {my}: On character controller collision

    On character controller collision.

  • Expressions

    Enable

    Physics enabled.

    CollisionData

    Collision data as JSON string.

    CollisionTargetUID

    UID of the other body involved in the collision.

    CollisionStarted

    1 if collision started, 0 if collision ended.

    CollisionNormalX

    X component of the outward contact normal (points away from the other body).

    CollisionNormalY

    Y component of the outward contact normal (points away from the other body).

    CollisionNormalZ

    Z component of the outward contact normal (points away from the other body).

    CollisionContactX

    X position of the contact point in world units.

    CollisionContactY

    Y position of the contact point in world units.

    CollisionContactZ

    Z position of the contact point in world units.

    CollisionImpulse

    Normal impulse magnitude of the collision. Scales with mass and impact speed; useful for damage thresholds.

    CharacterCollisionData

    Character collision data as JSON string.

    VelocityX

    Velocity x vector.

    VelocityY

    Velocity y vector.

    VelocityZ

    Velocity z vector.

    AngularVelocityX

    Angular velocity x (rad/s).

    AngularVelocityY

    Angular velocity y (rad/s).

    AngularVelocityZ

    Angular velocity z (rad/s).

    IsSleeping

    1 if the body is currently sleeping (physics paused), 0 if awake.

    BodyType

    Body type: 0=Dynamic, 1=Fixed, 2=KinematicPosition, 3=KinematicVelocity. -1 if not ready.

    Mass

    Total mass of the body.