Spawner now spawns with orientation
This commit is contained in:
@@ -51,7 +51,7 @@ EntityWrapper SpawnerSystem::Spawn(EntityWrapper spawner, EntityWrapper parent /
|
|||||||
// Set its position and orientation to that of the SpawnPoint
|
// Set its position and orientation to that of the SpawnPoint
|
||||||
spawnedEntity["Transform"]["Position"] = Transform::AbsolutePosition(spawnPoint.World, spawnPoint.ID);
|
spawnedEntity["Transform"]["Position"] = Transform::AbsolutePosition(spawnPoint.World, spawnPoint.ID);
|
||||||
// TODO: Quaternions, bitch
|
// TODO: Quaternions, bitch
|
||||||
//spawnedEntity["Transform"]["Orientation"] = glm::eulerAngles(Transform::AbsoluteOrientation(spawnPoint.World, spawnPoint.ID));
|
spawnedEntity["Transform"]["Orientation"] = glm::eulerAngles(Transform::AbsoluteOrientation(spawnPoint));
|
||||||
|
|
||||||
return spawnedEntity;
|
return spawnedEntity;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user