How to set WorldPosition in Entities.pre65

I just updated to .pre65 version and TransformAspect is be removed. I read document about update Transform in .pre65 but there is nothing about WorldPosition. Does anyone know to to do that in new Ver ? Thanks all.

Use LocalToWorld component. It has position field, which is world position of entity.

that field is readonly

You want to use LocalTransform component and its position field.

https://docs.unity3d.com/Packages/com.unity.entities@1.0/manual/transforms-concepts.html

Ah sorry. I was inattentive. You need to set world position. There is no direct way to do this in general case. You have to use LocalTransform directly if your entity has no parent. Otherwise you have to take into account LocalTransform of parent entity (use Parent component to get one).

1 Like