When you spawn an entity that isn't an NPC you get some pretty weird behavior regarding GetAbsOrigin. ent:GetAbsOrigin() will return fine, but anything in C++ that tries to interact with the origin fails. For example if you try to follow the entity (as in SetCameraTarget) than it will follow an undefined position. Just as well, JS calls on any entity like this will simply return null.
Setting the abs origin via :SetAbsOrigin() had no help on the issue.
Reproduction steps:
Spawn an entity as follows: SpawnEntityFromTableSynchronous('info_target', {origin = Vector(x,y,z)})
Attempt to call Entities.GetAbsOrigin on this entity
When you spawn an entity that isn't an NPC you get some pretty weird behavior regarding GetAbsOrigin. ent:GetAbsOrigin() will return fine, but anything in C++ that tries to interact with the origin fails. For example if you try to follow the entity (as in SetCameraTarget) than it will follow an undefined position. Just as well, JS calls on any entity like this will simply return null.
Setting the abs origin via :SetAbsOrigin() had no help on the issue.
Reproduction steps:
SpawnEntityFromTableSynchronous('info_target', {origin = Vector(x,y,z)})
Result: "null"