feat(JOML): migrate VisualCharacterSystem
*/
package org.terasology.logic.characters;
+import org.joml.Quaternionf;
+import org.joml.Vector3f;
import org.terasology.assets.management.AssetManager;
import org.terasology.engine.modes.loadProcesses.AwaitedLocalCharacterSpawnEvent;
import org.terasology.entitySystem.entity.EntityBuilder;
import org.terasology.logic.location.Location;
import org.terasology.logic.location.LocationComponent;
import org.terasology.logic.players.LocalPlayer;
-import org.terasology.math.geom.Quat4f;
-import org.terasology.math.geom.Vector3f;
import org.terasology.registry.In;
/**
@@ -97,7 +97,7 @@ private EntityRef createAndAttachVisualEntity(EntityBuilder entityBuilder, Entit
entityBuilder.addOrSaveComponent(new LocationComponent());
EntityRef visualCharacterEntity = entityBuilder.build();
- Location.attachChild(characterEntity, visualCharacterEntity, new Vector3f(), new Quat4f(0, 0, 0, 1));
+ Location.attachChild(characterEntity, visualCharacterEntity, new Vector3f(), new Quaternionf());
return visualCharacterEntity;
}
@@ -106,10 +106,10 @@ private EntityRef createAndAttachVisualEntity(EntityBuilder entityBuilder, Entit
}
/**
- * Handles the local character spawn event by doing the work that had to be delayed till then:
- * The CreateVisualCharacterEvent events that could not be sent previously will be sent.
- * (They could not be sent earlier as we need to know if the character belongs to the local player or not
- * which can't be determined if the created/loaded character has not been linked to the player yet)
+ * Handles the local character spawn event by doing the work that had to be delayed till then: The
+ * CreateVisualCharacterEvent events that could not be sent previously will be sent. (They could not be sent earlier
+ * as we need to know if the character belongs to the local player or not which can't be determined if the
+ * created/loaded character has not been linked to the player yet)
*/
@ReceiveEvent
public void onAwaitedLocalCharacterSpawnEvent(AwaitedLocalCharacterSpawnEvent event, EntityRef entity) {
