Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

{
    "componentName" : "box2d"
  , "type" : <dynamic|kinematic|static>
  , "position" : <Vector>
  , "positionZ" : <Float>
  , "angle" : <Float>
  , "fixedRotation" : <Bool>
  , "allowSleep" : <Bool>
  , "bullet" : <Bool>
  , "shapes" : <Array(Dynamic)>
  , "alwaysRender" : <Bool>
  , "joints" : <Array(Dynamic)>
}
"shapes" : [
    { 
        "type" : <circle|box|polygon> 
      , "width" : <Float>
      , "height" : <Float>
      , "density" : <Float>
      , "friction" : <Float>
      , "restitution" : <Float>
      , "collisionCategory" : <Int>
      , "collidesWith" : <Int>
      , "isSensor" : <Bool>
    }
]
"joints": [
    { 
        "entity" : <String> 
      , "type" : <weld|distance|revolute>
      , "positionOffset" : <Vector>
      , "positionZOffset" : <Float>
      , "angleOffset" : <Float> 
      // Revolute Options
      , "motorSpeed" : <Float>
      , "maxMotorTorque" : <Float>
    }
]

 

Overview

  • Adds a box2d physics component to entity

Properties

  • "collisionCategory" : <Int>

  • "position" : <FVector>

  • "positionX" : <Float>

  • "positionY" : <Float>

  • "positionZ" : <Float>

  • "angle" : <Float>

  • "angularVelocity" : <Float>

  • "linearVelocity" : <FVector>

Events

  • trigger
    • static - ParentJointCreated

Remarks

  • Handles pooled object
  • Will enable collisions with other scene objects
  • No labels