{ "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