Impl editor object names

This commit is contained in:
MegaMech
2025-03-07 23:27:37 -07:00
parent 882f14e91a
commit c44682b702
43 changed files with 76 additions and 30 deletions
+4 -5
View File
@@ -88,23 +88,22 @@ void Gizmo::Translate() {
_selected->Pos->x = (cameras[0].pos[0] + _ray.x * PickDistance) + _cursorOffset.x;
_selected->Pos->y = (cameras[0].pos[1] + _ray.y * PickDistance) + _cursorOffset.y;
_selected->Pos->z = (cameras[0].pos[2] + _ray.z * PickDistance) + _cursorOffset.z;
if (CVarGetInteger("gEditorSnapToGround", false) == true) {
if (CVarGetInteger("gEditorSnapToGround", 0) == true) {
_selected->Pos->y = SnapToSurface(_selected->Pos);
}
printf("TEST %f\n", _selected->Pos->y);
break;
case GizmoHandle::X_Axis:
_selected->Pos->x = (cameras[0].pos[0] + _ray.x * length) + _cursorOffset.x;
if (CVarGetInteger("gEditorSnapToGround", false) == true) {
if (CVarGetInteger("gEditorSnapToGround", 0) == true) {
_selected->Pos->y = SnapToSurface(_selected->Pos);
}
break;
break;
case GizmoHandle::Y_Axis:
_selected->Pos->y = (cameras[0].pos[1] + _ray.y * length) + _cursorOffset.y;
break;
case GizmoHandle::Z_Axis:
_selected->Pos->z = (cameras[0].pos[2] + _ray.z * length) + _cursorOffset.z;
if (CVarGetInteger("gEditorSnapToGround", false) == true) {
if (CVarGetInteger("gEditorSnapToGround", 0) == true) {
_selected->Pos->y = SnapToSurface(_selected->Pos);
}
break;