How to get world position of an entity in Amazon Sumerian?

136 Views Asked by At

In Amazon Sumerian, ctx.entity.transformComponent.position gives position of the entity in local space of parent.

How can you get the world position of an entity?

1

There are 1 best solutions below

0
On

You can get the world position of an entity using the following call:

ctx.entity.transformComponent.getWorldTranslation()

Additional Info:

  1. I did not find any way to directly set the world position of an entity.
  2. To set the position use setTranslation().