PhysicsToolsets.PhysicsAssetToolset¶
Provides tools for creating and managing Physics Assets.
17 tool(s).
PhysicsToolsets.PhysicsAssetToolset.AddBody¶
Adds a new empty body for the given bone.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone to add a body for.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.AddConstraint¶
Adds a new constraint between two bodies. Both bodies must already exist.
Input schema
{
"properties": {
"bone1Name": {
"description": "Name of the child bone.",
"type": "string"
},
"bone2Name": {
"description": "Name of the parent bone.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"bone1Name",
"bone2Name"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.CreateFromMesh¶
Creates a physics asset from a skeletal mesh, auto-generating collision bodies for each bone. The asset is placed in the same folder as the mesh with the suffix "_PhysicsAsset".
Input schema
{
"properties": {
"bAssignToMesh": {
"description": "If true, assigns the new physics asset to the mesh.",
"type": "boolean"
},
"meshPath": {
"description": "Content-browser path to the skeletal mesh, e.g. '/Game/Characters/SKM_Hero'.",
"type": "string"
}
},
"required": [
"meshPath",
"bAssignToMesh"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"description": "The newly created physics asset.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.GetBodyMassScale¶
Returns the mass-scale multiplier for the given body.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to query.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to query.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"type": "number"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.GetBodyNames¶
Returns the bone name for each rigid body in a physics asset.
Input schema
{
"properties": {
"physicsAsset": {
"description": "The physics asset to query.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"description": "A list of bone names, one per body.",
"items": {
"type": "string"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.GetBodyPhysicsMode¶
Returns the physics simulation mode for the given body.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to query.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to query.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"enum": [
"Default",
"Kinematic",
"Simulated"
],
"title": "EBodyPhysicsMode",
"type": "string"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.GetBodyShapes¶
Returns all collision shapes assigned to a body.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body shapes to retrieve.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to query.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"description": "A list of shape descriptors. Raises a script error if no body exists for the bone.",
"items": {
"properties": {
"center": {
"description": "Center position in bone-local space (cm).",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "Vector",
"type": "object"
},
"extentX": {
"description": "Full extent along local X (cm). Used by Box only.",
"type": "number"
},
"extentY": {
"description": "Full extent along local Y (cm). Used by Box only.",
"type": "number"
},
"extentZ": {
"description": "Full extent along local Z (cm). Used by Box only.",
"type": "number"
},
"length": {
"description": "Cylinder section length (cm). Used by Capsule only.\nTotal capsule height = Length + 2 * Radius.",
"type": "number"
},
"radius": {
"description": "Radius (cm). Used by Sphere and Capsule.",
"type": "number"
},
"rotation": {
"description": "Orientation in bone-local space.\nFor Capsule, Z is the long axis. Unused for Sphere.",
"properties": {
"pitch": {
"description": "Pitch (degrees) around Y axis",
"type": "number"
},
"roll": {
"description": "Roll (degrees) around X axis",
"type": "number"
},
"yaw": {
"description": "Yaw (degrees) around Z axis",
"type": "number"
}
},
"required": [
"pitch",
"yaw",
"roll"
],
"title": "Rotator",
"type": "object"
},
"shapeName": {
"description": "User-defined name that uniquely identifies this shape on the body.",
"type": "string"
},
"shapeType": {
"description": "The type of collision primitive.",
"enum": [
"Sphere",
"Capsule",
"Box"
],
"title": "EPhysicsShapeType",
"type": "string"
}
},
"required": [
"shapeName",
"shapeType",
"center",
"rotation",
"radius",
"length",
"extentX",
"extentY",
"extentZ"
],
"title": "PhysicsShapeInfo",
"type": "object"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.GetConstraints¶
Returns all constraints in the physics asset with their current angular limits.
Input schema
{
"properties": {
"physicsAsset": {
"description": "The physics asset to query.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset"
],
"type": "object"
}
Output schema
{
"properties": {
"returnValue": {
"description": "A list of constraint descriptors.",
"items": {
"properties": {
"bone1Name": {
"description": "Name of the child bone.",
"type": "string"
},
"bone2Name": {
"description": "Name of the parent bone.",
"type": "string"
},
"swing1LimitDegrees": {
"description": "Swing 1 limit in degrees. Used when Swing1Motion is Limited.",
"type": "number"
},
"swing1Motion": {
"description": "Motion type for Swing 1 (rotation around the body-local Y axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
},
"swing2LimitDegrees": {
"description": "Swing 2 limit in degrees. Used when Swing2Motion is Limited.",
"type": "number"
},
"swing2Motion": {
"description": "Motion type for Swing 2 (rotation around the body-local Z axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
},
"twistLimitDegrees": {
"description": "Twist limit in degrees. Used when TwistMotion is Limited.",
"type": "number"
},
"twistMotion": {
"description": "Motion type for Twist (rotation around the body-local X axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
}
},
"required": [
"bone1Name",
"bone2Name",
"swing1Motion",
"swing1LimitDegrees",
"swing2Motion",
"swing2LimitDegrees",
"twistMotion",
"twistLimitDegrees"
],
"title": "PhysicsConstraintInfo",
"type": "object"
},
"type": "array"
}
},
"required": [
"returnValue"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.RemoveBody¶
Removes the body for the given bone along with any constraints that reference it. Raises a script error if PhysicsAsset is null or no body exists for BoneName.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to remove.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.RemoveConstraint¶
Removes the constraint between two bodies.
Input schema
{
"properties": {
"bone1Name": {
"description": "Name of the child bone.",
"type": "string"
},
"bone2Name": {
"description": "Name of the parent bone.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"bone1Name",
"bone2Name"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.RemoveShape¶
Removes a collision primitive from a body by name.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
},
"shapeName": {
"description": "The name of the shape to remove.",
"type": "string"
}
},
"required": [
"physicsAsset",
"boneName",
"shapeName"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetBodyMassScale¶
Sets the mass-scale multiplier for the given body.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"massScale": {
"description": "Multiplier applied to the computed mass. Must be greater than zero.",
"type": "number"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName",
"massScale"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetBodyPhysicsMode¶
Sets the physics simulation mode for the given body.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"mode": {
"description": "The desired simulation mode.",
"enum": [
"Default",
"Kinematic",
"Simulated"
],
"title": "EBodyPhysicsMode",
"type": "string"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"boneName",
"mode"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetBox¶
Adds or replaces a box collision primitive on a body. If any shape with the given name already exists on the body it is removed first.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"center": {
"description": "Center of the box in bone-local space (cm).",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "Vector",
"type": "object"
},
"extentX": {
"description": "Full extent along local X (cm). Must be greater than zero.",
"type": "number"
},
"extentY": {
"description": "Full extent along local Y (cm). Must be greater than zero.",
"type": "number"
},
"extentZ": {
"description": "Full extent along local Z (cm). Must be greater than zero.",
"type": "number"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
},
"rotation": {
"description": "Orientation of the box in bone-local space.",
"properties": {
"pitch": {
"description": "Pitch (degrees) around Y axis",
"type": "number"
},
"roll": {
"description": "Roll (degrees) around X axis",
"type": "number"
},
"yaw": {
"description": "Yaw (degrees) around Z axis",
"type": "number"
}
},
"required": [
"pitch",
"yaw",
"roll"
],
"title": "Rotator",
"type": "object"
},
"shapeName": {
"description": "A name that uniquely identifies this shape on the body.",
"type": "string"
}
},
"required": [
"physicsAsset",
"boneName",
"shapeName",
"center",
"rotation",
"extentX",
"extentY",
"extentZ"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetCapsule¶
Adds or replaces a capsule collision primitive on a body. If any shape with the given name already exists on the body it is removed first. The capsule's long axis is its local Z after applying Rotation.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"center": {
"description": "Center of the capsule in bone-local space (cm).",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "Vector",
"type": "object"
},
"length": {
"description": "Length of the cylindrical section (cm). Must be non-negative. Total capsule height = Length + 2 * Radius.",
"type": "number"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
},
"radius": {
"description": "Radius of the capsule end-caps (cm). Must be greater than zero.",
"type": "number"
},
"rotation": {
"description": "Orientation of the capsule in bone-local space.",
"properties": {
"pitch": {
"description": "Pitch (degrees) around Y axis",
"type": "number"
},
"roll": {
"description": "Roll (degrees) around X axis",
"type": "number"
},
"yaw": {
"description": "Yaw (degrees) around Z axis",
"type": "number"
}
},
"required": [
"pitch",
"yaw",
"roll"
],
"title": "Rotator",
"type": "object"
},
"shapeName": {
"description": "A name that uniquely identifies this shape on the body.",
"type": "string"
}
},
"required": [
"physicsAsset",
"boneName",
"shapeName",
"center",
"rotation",
"radius",
"length"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetConstraintLimits¶
Updates the angular limits for an existing constraint.
Input schema
{
"properties": {
"info": {
"description": "Constraint descriptor. Bone1Name and Bone2Name identify the constraint.",
"properties": {
"bone1Name": {
"description": "Name of the child bone.",
"type": "string"
},
"bone2Name": {
"description": "Name of the parent bone.",
"type": "string"
},
"swing1LimitDegrees": {
"description": "Swing 1 limit in degrees. Used when Swing1Motion is Limited.",
"type": "number"
},
"swing1Motion": {
"description": "Motion type for Swing 1 (rotation around the body-local Y axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
},
"swing2LimitDegrees": {
"description": "Swing 2 limit in degrees. Used when Swing2Motion is Limited.",
"type": "number"
},
"swing2Motion": {
"description": "Motion type for Swing 2 (rotation around the body-local Z axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
},
"twistLimitDegrees": {
"description": "Twist limit in degrees. Used when TwistMotion is Limited.",
"type": "number"
},
"twistMotion": {
"description": "Motion type for Twist (rotation around the body-local X axis).",
"enum": [
"Free",
"Limited",
"Locked"
],
"title": "EConstraintMotion",
"type": "string"
}
},
"required": [
"bone1Name",
"bone2Name",
"swing1Motion",
"swing1LimitDegrees",
"swing2Motion",
"swing2LimitDegrees",
"twistMotion",
"twistLimitDegrees"
],
"title": "PhysicsConstraintInfo",
"type": "object"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
}
},
"required": [
"physicsAsset",
"info"
],
"type": "object"
}
PhysicsToolsets.PhysicsAssetToolset.SetSphere¶
Adds or replaces a sphere collision primitive on a body. If any shape with the given name already exists on the body it is removed first.
Input schema
{
"properties": {
"boneName": {
"description": "The name of the bone whose body to modify.",
"type": "string"
},
"center": {
"description": "Center of the sphere in bone-local space (cm).",
"properties": {
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"title": "Vector",
"type": "object"
},
"physicsAsset": {
"description": "The physics asset to modify.",
"properties": {
"refPath": {
"description": "The reference stored as a soft path string.",
"type": "string"
}
},
"required": [
"refPath"
],
"title": "/Script/Engine.PhysicsAsset",
"type": "object"
},
"radius": {
"description": "Radius of the sphere (cm). Must be greater than zero.",
"type": "number"
},
"shapeName": {
"description": "A name that uniquely identifies this shape on the body.",
"type": "string"
}
},
"required": [
"physicsAsset",
"boneName",
"shapeName",
"center",
"radius"
],
"type": "object"
}