class Followable(target: Entity = Entity.nullEntity(), offset: Pose = Pose(Vector3(0.0f, 0.0f, 3.0f), Quaternion(0.0f, 0.0f, 1.0f, 0.0f)), minAngle: Float = -90f, maxAngle: Float = 90.0f, type: FollowableType = FollowableType.FACE, tolerance: Float = 0.2f, speed: Float = 1.0f, active: Boolean = true) : ComponentBase
| Name | Summary |
|---|---|
Followable | constructor(target: Entity = Entity.nullEntity(), offset: Pose = Pose(Vector3(0.0f, 0.0f, 3.0f), Quaternion(0.0f, 0.0f, 1.0f, 0.0f)), minAngle: Float = -90f, maxAngle: Float = 90.0f, type: FollowableType = FollowableType.FACE, tolerance: Float = 0.2f, speed: Float = 1.0f, active: Boolean = true) |
| Name | Summary |
|---|---|
Companion | object Companion : ComponentCompanion |
| Name | Summary |
|---|---|
active | var active: Boolean Whether entity is actively following or not |
cachable | open override var cachable: <Error class: unknown class> |
entID | var entID: Long |
isDirty | var isDirty: Boolean |
maxAngle | var maxAngle: Float Maximum Y angle offset a followable will keep from target, 0 is straight ahead, positive values are up, negative values are down |
minAngle | var minAngle: Float Minimum Y angle offset a followable will keep from target, 0 is straight ahead, positive values are up, negative values are down |
offset | |
recycled | var recycled: Boolean |
speed | var speed: Float How fast followable tracks to its desired location. Float value is a percent of default speed |
target | |
timeStamp | var timeStamp: Long |
tolerance | var tolerance: Float This is the change in distance needed to start moving |
type | var type: FollowableType The type of behavior an object has when following (faces user, pivots on y axis, etc.) |
| Name | Summary |
|---|---|
companion | |
getComponentDataAttributeType | fun getComponentDataAttributeType(key: Int): AttributePrimitive? Gets the attribute type for the specified key. fun getComponentDataAttributeType(keyString: String): AttributePrimitive? Gets the attribute type for the specified string key. |
getComponentDataKey | fun getComponentDataKey(key: String): Int? Gets the integer key associated with the specified string key. |
getComponentDataValue | fun getComponentDataValue(key: Int): Any? Gets the value for the specified key. fun getComponentDataValue(keyString: String): Any? Gets the value for the specified string key. |
getEnumClass | fun getEnumClass(key: String): Class<out Enum<*>>? Gets the enum class associated with the specified string key. |
hasComponentData | fun hasComponentData(key: Int): Boolean Checks if this component has data for the specified key. fun hasComponentData(keyString: String): Boolean Checks if this component has data for the specified string key. |
read | |
recycle | fun recycle() Recycles this component by returning it to its pool. |
reset | open fun reset() Resets the component to its default state. |
setComponentDataValue | fun setComponentDataValue(key: Int, value: Any): Boolean Sets the value for the specified key. fun setComponentDataValue(keyString: String, value: Any): Boolean Sets the value for the specified string key. |
setPool | fun setPool(pool: ComponentPool<*>, entID: Long) Sets the component pool and entity ID for this component. |
toString | open override fun toString(): String |
typeID | open override fun typeID(): Int Returns the unique type ID of this component. |
write |
object Companion : ComponentCompanion
| Name | Summary |
|---|---|
activeData | val activeData: BooleanAttributeData |
activeId | val activeId: <Error class: unknown class> |
attributeKeys_ | val attributeKeys_: IntArray |
attributeTypeCounts_ | val attributeTypeCounts_: IntArray |
attributeTypes_ | val attributeTypes_: IntArray |
attrMetaData_ | val attrMetaData_: Map<Int, <Error class: unknown class><RegisteredAttributeType, String>> |
createDefaultInstance | open override val createDefaultInstance: () -> Followable |
enumClassesMap_ | val enumClassesMap_: Map<Int, Class<out Enum<*>>> |
id | open override val id: <Error class: unknown class> |
keyStringToKeyIntMap_ | val keyStringToKeyIntMap_: Map<String, Int> |
maxAngleData | val maxAngleData: FloatAttributeData |
maxAngleId | val maxAngleId: <Error class: unknown class> |
minAngleData | val minAngleData: FloatAttributeData |
minAngleId | val minAngleId: <Error class: unknown class> |
offsetData | val offsetData: PoseAttributeData |
offsetId | val offsetId: <Error class: unknown class> |
speedData | val speedData: FloatAttributeData |
speedId | val speedId: <Error class: unknown class> |
targetData | val targetData: EntityAttributeData |
targetId | val targetId: <Error class: unknown class> |
toleranceData | val toleranceData: FloatAttributeData |
toleranceId | val toleranceId: <Error class: unknown class> |
typeData | val typeData: EnumAttributeData |
typeId | val typeId: <Error class: unknown class> |
| Name | Summary |
|---|---|
attributeKeys | open override fun attributeKeys(): IntArray |
attributeMetaData | open override fun attributeMetaData(): Map<Int, <Error class: unknown class><RegisteredAttributeType, String>> |
attributeTypeCountAvailable | open override fun attributeTypeCountAvailable(): Boolean |
attributeTypeCounts | open override fun attributeTypeCounts(): IntArray |
attributeTypes | open override fun attributeTypes(): IntArray |
dependents | open fun dependents(): IntArray |
enumClassesMap | open override fun enumClassesMap(): Map<Int, Class<out Enum<*>>> |
keyStringToKeyIntMap | open override fun keyStringToKeyIntMap(keyString: String): Int? |