Skip to main content

Joint3D

TypeNameInterface Description
Variablesanchor : Vector3f

Fixed Point

Example

joint.anchor = new APJS.Vector3f(1, 0, 0);

Use Case

// anchor (Joint3D)
@customNode()
export class Use Case_Joint3D_anchor extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const joint = this.sceneObject.getComponent('Joint3D') as APJS.Joint3D;
if (!joint) return;
const anchor = joint.anchor;
this.info = `anchor: (${anchor.x}, ${anchor.y}, ${anchor.z})`;
joint.anchor = new APJS.Vector3f(1, 0, 0); // Example: set to (1, 0, 0)
}
}

TypeNameInterface Description
VariablesconnectedAnchor : Vector3f

Connecting Object Fixed Point

Example

joint.connectedAnchor = new APJS.Vector3f(0, 1, 0); 

Use Case

// connectedAnchor (Joint3D)
@customNode()
export class Use Case_Joint3D_connectedAnchor extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const joint = this.sceneObject.getComponent('Joint3D') as APJS.Joint3D;
if (!joint) return;
const cAnchor = joint.connectedAnchor;
this.info = `connectedAnchor: (${cAnchor.x}, ${cAnchor.y}, ${cAnchor.z})`;
joint.connectedAnchor = new APJS.Vector3f(0, 1, 0); // Example: set to (0, 1, 0)
}
}
TypeNameInterface Description
VariablesbreakingForce : number

Breaking force (joint breaks after internal force exceeds this value)

Example

joint.breakingForce = 1.0;

Use Case

// breakingForce (Joint3D)
@customNode()
export class Use Case_Joint3D_breakingForce extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const joint = this.sceneObject.getComponent('Joint3D') as APJS.Joint3D;
if (!joint) return;
const prev = joint.breakingForce;
this.info = `breakingForce: ${prev}`;
joint.breakingForce = 1.0; // Example: set to 1
}
}
TypeNameInterface Description
VariablesbreakingTorque : number

Breaking torque (the joint breaks when the internal torque exceeds this value)

Example

joint.breakingTorque = 2.0;

Use Case

// breakingTorque (Joint3D)
@customNode()
export class Use Case_Joint3D_breakingTorque extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const joint = this.sceneObject.getComponent('Joint3D') as APJS.Joint3D;
if (!joint) return;
const prev = joint.breakingTorque;
this.info = `breakingTorque: ${prev}`;
joint.breakingTorque = 2.0; // Example: set to 2
}
}
Copyright © 2025 TikTok. All rights reserved.
About TikTokHelp CenterCareersContactLegalCookies