Skip to main content

SpringJoint

TypeNameInterface Description
Variablesdamping : number

Damping (Motion Energy Dissipation Coefficient)

Example

spring.damping = 0.5;

Use Case

// damping (SpringJoint)
@customNode()
export class Use Case_SpringJoint_damping extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const spring = this.sceneObject.getComponent('SpringJoint') as APJS.SpringJoint;
if (!spring) return;
const prev = spring.damping;
this.info = `SpringJoint damping: ${prev}`;
spring.damping = 0.5; // Example: set to 0.5
}
}
TypeNameInterface Description
Variablestolerance : number

Tolerance (the movable range of the spring end point, spring stiffness coefficient)

Example

spring.tolerance = 0.01;

Use Case

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