ReadonlyapiGeneric object accessible by other instances of ScriptComponent. Use this object to store references to properties and methods that need to be accessible from other ScriptComponents.
If disabled, the Component will stop enacting its behavior.
ReadonlyisReturns true if this Component, its SceneObject, and all of that SceneObjects parents are enabled.
ReadonlysceneThe SceneObject this component is on.
ReadonlyuniqueSets the background color of the capsule.
A vec4 representing the RGBA color to set as the background color.
get the depth of the capsule and updates its local scale accordingly.
value - The new depth value to set for the capsule.
Sets the depth of the capsule and updates its local scale accordingly.
The new depth value to set for the capsule.
Gets the RenderMeshVisual instance associated with this capsule.
The RenderMeshVisual instance.
The render order of the Capsule 3D.
The render order of the Capsule 3D.
Sets the size of the capsule by updating its width and height. Adjusts the local scale of the capsule's transform to reflect the new size.
A vec2 object representing the new size of the capsule,
where x is the width and y is the height.
Adds a new SceneEvent, triggered by eventType events, to the ScriptComponent.
Destroys the component.
Returns the SceneObject the component is attached to.
Returns the Transform this component is attached to.
StaticgetReturns the name of this object's type.
Initializes the capsule component. This method sets up the mesh, material, size, and background color for the capsule. It ensures that the initialization process is only performed once.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other. Useful for checking if two references point to the same thing.
Removes a previously added SceneEvent from the ScriptComponent.
The
Capsuleclass represents a 3D capsule component in the scene. It extends theBaseScriptComponentand provides functionality for rendering and customizing the capsule's appearance.Decorator
@component