Verse using statement |
using { /Fortnite.com/Items } |
Inheritance Hierarchy
This class is derived from component.
| Name | Description |
|---|---|
component |
Base class for authoring logic and data in the SceneGraph. Using components you can author re-usable building blocks of logic and data which can then be added to entities in the scene. Components are a very low level building block which can be used in many ways. For example:
As components are generic there is no specific way that they must be used. It is up to the needs of your experience if you use one big game component or if you break up logic into many small components. Classes deriving from component must also specify Only one instance of a component from each subclass group can be added to an entity at a time. For example, given this group of components, only one light_component can exist on a single entity. To create multiple lights you should use multiple entities. light_component := class ============================================================================== Component Lifetime Components move through a series of lifetime functions as they are added to entities, added to the scene, and begin running in the simulation. Components should override these methods to perform setup and run their simulation. As a component shuts down it will then move through shutdown version of these
functions, giving users the opportunity to clean up any retained state on the
component before it is disposed
.
Lifetime Methods:
OnAddedToScene
OnBeginSimulation -> OnSimulate |
Members
This class has both data members and functions.
Data
| Data Member Name | Type | Description |
|---|---|---|
BreakDistance |
?float |
The hold breaks when an applied force pushes the object past this distance, in cm, from its hold position. Larger values will allow the object to be pushed around and spring back to its hold position. If |
BreakHoldPropEvent |
listenable(payload) |
Called when the hold on a grabbed object is broken by forces being applied to it. Provides the |
CurrentHoldDistance |
??float |
The current distance, in cm, from the grabbing agent to the physical prop, along the agent |
DropPropEvent |
listenable(payload) |
Called when a grabbed object is dropped. Provides the dropped |
Entity |
entity |
The parent entity of this component.
|
GrabPropEvent |
listenable(payload) |
Called when an object is grabbed. Provides the held |
GrabRange |
?float |
The distance, in cm, objects can be grabbed. If |
HoldOrientationType |
?telekineticon_hold_orientation |
Determines the object`s rotation when grabbed. |
HoldPointType |
?telekineticon_hold_point |
Determines where on the object the object is grabbed. |
HoldStiffness |
?float |
The strength of the acceleration, in cm/second^2, that holds the physical prop. With a 1kg prop - ~ |
StartingGrabDistance |
??float |
The distance in front of the grabbing agent, in cm, the physical prop is held, along the agent |
TickEvents |
?tick_events |
Set callbacks to |
Functions
| Function Name | Description |
|---|---|
Drop |
If the item has a grabbed object, drop it. Fails if no object is being grabbed. |
GetHeldProp |
Get the current object being grabbed. Fails if no object is being grabbed. |
IsInScene |
Succeeds if the component is currently in the scene.
|
IsSimulating |
Succeeds if the component is currently simulating.
|
OnAddedToScene |
Called when the component is added to the scene by parenting it under the simulation entity or another entity already in the scene.
|
OnBeginSimulation |
Called when the component begins simulating within the scene.
|
OnEndSimulation |
Called when the component ends simulation within the scene.
|
OnReceive |
Respond to a scene event. Return true to consume the event and halt propagation to the next entity. |
OnRemovingFromScene |
Called when the component is about to be removed from the scene.
|
OnSimulate |
Called when the component begins simulating within the scene.
|
RemoveFromEntity |
Removes the component from the entity.
|
SendDown |
Send a scene event to this component, invoking OnReceive. Returns true if any participant consumed the event. |