YaMovableComponent¶
Beta
YaMovableComponent
Control the Entity's transform, etc.Functions¶
Set rotation for this entity
Set rotation for this entity
float3 GetRotationEuler()Beta
Get current rotation
quaternion GetRotationQuaternion()Beta
Get current rotation
float3 GetGlobalRotationEuler()Beta
Get current global rotation
quaternion GetGlobalRotationQuaternion()Beta
Get current global rotation
Set position for this entity
float3 GetPosition()Beta
Get current local position
float3 GetGlobalPosition()Beta
Get current global position
float3 GetScale()Beta
Get scale of this entity.
float3 GetLossyGlobalScale()Beta
Get global scale of this entity.
Pay attention that this scale can be inaccurate due to shearing transform.
Set global position of this entity.
Set global rotation of this entity.
Set global rotation of this entity.
Code sample¶
--Get movable component
local cmp = script:GetYaComponent("YaMovableComponent")
--Set position
local f3 = float3.New(0,0,0)
cmp:SetPosition(f3)
--Get position
f3 = cmp:GetPosition()
print(f3)