SphereCollider
Type | Name | Interface Description |
---|---|---|
Variables | radius : number | Radius of Spherical Collider |
Example
sphere.radius = 2.0;
Use Case
// radius (SphereCollider)
@customNode()
export class Use Case_SphereCollider_radius extends BasicScriptNode {
@input() sceneObject: APJS.SceneObject;
@output() info: string;
execute() {
const sphere = this.sceneObject.getComponent('SphereCollider') as APJS.SphereCollider;
if (!sphere) return;
const radius = sphere.radius;
this.info = `SphereCollider radius: ${radius}`;
sphere.radius = 2.0; // Example: set to 2.0
}
}