support for observing ai entities
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
All checks were successful
studiorailgun/Renderer/pipeline/head This commit looks good
This commit is contained in:
parent
214f9ee171
commit
b2e93da04e
@ -2097,6 +2097,7 @@ Unit test for generating a world
|
|||||||
TownLayout test
|
TownLayout test
|
||||||
Macro pathing test
|
Macro pathing test
|
||||||
Actually fix pathing spinlock
|
Actually fix pathing spinlock
|
||||||
|
Support for observing ai entities
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import java.util.List;
|
|||||||
import org.joml.Quaterniond;
|
import org.joml.Quaterniond;
|
||||||
import org.joml.Vector3d;
|
import org.joml.Vector3d;
|
||||||
|
|
||||||
|
import electrosphere.client.entity.camera.CameraEntityUtils;
|
||||||
import electrosphere.engine.Globals;
|
import electrosphere.engine.Globals;
|
||||||
import electrosphere.engine.assetmanager.AssetDataStrings;
|
import electrosphere.engine.assetmanager.AssetDataStrings;
|
||||||
import electrosphere.entity.ClientEntityUtils;
|
import electrosphere.entity.ClientEntityUtils;
|
||||||
@ -87,6 +88,13 @@ public class ImGuiAI {
|
|||||||
Character character = Globals.serverState.characterService.getCharacter(serverCharacterData.getCharacterData().getId());
|
Character character = Globals.serverState.characterService.getCharacter(serverCharacterData.getCharacterData().getId());
|
||||||
CharacterGoal.setCharacterGoal(character, new CharacterGoal(CharacterGoalType.LEAVE_SIM_RANGE));
|
CharacterGoal.setCharacterGoal(character, new CharacterGoal(CharacterGoalType.LEAVE_SIM_RANGE));
|
||||||
}
|
}
|
||||||
|
if(ImGui.button("Jump To")){
|
||||||
|
Entity aiEnt = ai.getParent();
|
||||||
|
Vector3d aiEntPos = EntityUtils.getPosition(aiEnt);
|
||||||
|
Globals.controlHandler.setIsThirdPerson(true);
|
||||||
|
Globals.cameraHandler.setTrackPlayerEntity(false);
|
||||||
|
CameraEntityUtils.setCameraCenter(Globals.clientState.playerCamera, new Vector3d(aiEntPos));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui.unindent();
|
ImGui.unindent();
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user