Basic Scene Explorer Works

This commit is contained in:
MegaMech
2025-03-07 16:12:21 -07:00
parent e51e11c9b0
commit 087b1b613c
15 changed files with 72 additions and 26 deletions
+9 -3
View File
@@ -50,8 +50,6 @@ void Gizmo::Tick() {
// Makes the gizmo visible
void Gizmo::Enable(GameObject* object, Ray ray) {
static float length = 180.0f; // Default value
_selected = object;
_ray = ray.Direction;
Pos = FVector(
@@ -61,6 +59,15 @@ void Gizmo::Enable(GameObject* object, Ray ray) {
);
}
void Gizmo::EnableNoCursor(GameObject* object) {
_selected = object;
Pos = FVector(
object->Pos->x,
object->Pos->y,
object->Pos->z
);
}
void Gizmo::Translate() {
static float length = 180.0f; // Default value
@@ -70,7 +77,6 @@ void Gizmo::Translate() {
}
if (Enabled) {
//FVector ray = ScreenRayTrace();
length = sqrt(
pow(_selected->Pos->x - cameras[0].pos[0], 2) +
pow(_selected->Pos->y - cameras[0].pos[1], 2) +