Documentation: AttachToEntityComponent
Jump to navigation
Jump to search
Name | Type | Initial Value | Example Range | Description |
---|---|---|---|---|
Members | ||||
only_position | bool | false | if 1, we only inherit position. it is calculated as follows: target_position + target_offset * target_scale | |
target_hotspot_tag | std::string | if set, we apply the offset of target HotSpot with this tag | ||
target_sprite_id | int | -1 | if >= 0, the Nth sprite transform in target entity is inherited | |
rotate_based_on_x_scale | bool | false | if 1, the rotation is set to 0 deg if scale >= 0 else to 180 deg | |
destroy_component_when_target_is_gone | bool | true | should probably be on by default | |
Custom data types | ||||
Transform | types::xform | |||
Privates | ||||
target | EntityID | EntityID of the entity we're attached to. This will fail after save/load, unfortunately | ||
mUpdateFrame | int | -1 |