small godot addon for gizmo creation
| -rw-r--r-- | addons/@bendn/gizmo3d/package.json | 2 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/rotation/rotation.gd | 4 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/rotation/rotation.tscn | 1 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/rotation/torus.tres | 5 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/scale/box.tres | 5 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/scale/cylinder.tres | 5 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/translate/cylinder.tres | 5 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/translate/point.tres | 5 | ||||
| -rw-r--r-- | addons/@bendn/gizmo3d/translate/translate.tscn | 2 |
9 files changed, 25 insertions, 9 deletions
diff --git a/addons/@bendn/gizmo3d/package.json b/addons/@bendn/gizmo3d/package.json index 54266c7..569286b 100644 --- a/addons/@bendn/gizmo3d/package.json +++ b/addons/@bendn/gizmo3d/package.json @@ -1,6 +1,6 @@ { "name": "@bendn/gizmo3d", - "version": "1.0.2", + "version": "1.0.3", "description": "small addon for gizmo creation", "main": "gizmo.gd", "scripts": { diff --git a/addons/@bendn/gizmo3d/rotation/rotation.gd b/addons/@bendn/gizmo3d/rotation/rotation.gd index eda9f7a..4bb4dc3 100644 --- a/addons/@bendn/gizmo3d/rotation/rotation.gd +++ b/addons/@bendn/gizmo3d/rotation/rotation.gd @@ -6,8 +6,8 @@ class_name RotationGizmo func _input(event: InputEvent) -> void: if rotate_cw.matches_event(event) and event.is_pressed(): - rotated.emit(Vector3(0, PI/2, 0)) + rotated.emit(Vector3(0, -(PI/2), 0)) finalize.emit() elif rotate_ccw.matches_event(event) and event.is_pressed(): - rotated.emit(Vector3(0, -(PI/2), 0)) + rotated.emit(Vector3(0, PI/2, 0)) finalize.emit() diff --git a/addons/@bendn/gizmo3d/rotation/rotation.tscn b/addons/@bendn/gizmo3d/rotation/rotation.tscn index 4f29f61..ece3036 100644 --- a/addons/@bendn/gizmo3d/rotation/rotation.tscn +++ b/addons/@bendn/gizmo3d/rotation/rotation.tscn @@ -25,6 +25,7 @@ unicode = 82 events = [SubResource("InputEventKey_gor3q")] [node name="rotation" type="Node3D"] +transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 0, 0) script = ExtResource("1_7laj6") rotate_cw = SubResource("Shortcut_jvc8g") rotate_ccw = SubResource("Shortcut_0sfr4") diff --git a/addons/@bendn/gizmo3d/rotation/torus.tres b/addons/@bendn/gizmo3d/rotation/torus.tres index 3fa5889..bbebb10 100644 --- a/addons/@bendn/gizmo3d/rotation/torus.tres +++ b/addons/@bendn/gizmo3d/rotation/torus.tres @@ -1,6 +1,9 @@ -[gd_resource type="TorusMesh" format=3 uid="uid://bw6rig250ekqw"] +[gd_resource type="TorusMesh" load_steps=2 format=3 uid="uid://bw6rig250ekqw"] + +[ext_resource type="Material" uid="uid://boc66segplbdg" path="res://addons/@bendn/gizmo3d/center.tres" id="1_yovum"] [resource] +material = ExtResource("1_yovum") inner_radius = 14.0 outer_radius = 15.0 ring_segments = 8 diff --git a/addons/@bendn/gizmo3d/scale/box.tres b/addons/@bendn/gizmo3d/scale/box.tres index 76aab11..7838513 100644 --- a/addons/@bendn/gizmo3d/scale/box.tres +++ b/addons/@bendn/gizmo3d/scale/box.tres @@ -1,4 +1,7 @@ -[gd_resource type="BoxMesh" format=3 uid="uid://dqf33w5edcobv"] +[gd_resource type="BoxMesh" load_steps=2 format=3 uid="uid://dqf33w5edcobv"] + +[ext_resource type="Material" uid="uid://boc66segplbdg" path="res://addons/@bendn/gizmo3d/center.tres" id="1_v4sw0"] [resource] +material = ExtResource("1_v4sw0") size = Vector3(3, 3, 3) diff --git a/addons/@bendn/gizmo3d/scale/cylinder.tres b/addons/@bendn/gizmo3d/scale/cylinder.tres index 88f9e73..98d1baf 100644 --- a/addons/@bendn/gizmo3d/scale/cylinder.tres +++ b/addons/@bendn/gizmo3d/scale/cylinder.tres @@ -1,6 +1,9 @@ -[gd_resource type="CylinderMesh" format=3 uid="uid://lc08lgqf086"] +[gd_resource type="CylinderMesh" load_steps=2 format=3 uid="uid://lc08lgqf086"] + +[ext_resource type="Material" uid="uid://boc66segplbdg" path="res://addons/@bendn/gizmo3d/center.tres" id="1_us6hu"] [resource] +material = ExtResource("1_us6hu") top_radius = 1.0 bottom_radius = 1.0 height = 14.0 diff --git a/addons/@bendn/gizmo3d/translate/cylinder.tres b/addons/@bendn/gizmo3d/translate/cylinder.tres index 4dc8f04..bb5b7b1 100644 --- a/addons/@bendn/gizmo3d/translate/cylinder.tres +++ b/addons/@bendn/gizmo3d/translate/cylinder.tres @@ -1,6 +1,9 @@ -[gd_resource type="CylinderMesh" format=3 uid="uid://c3hxlx3k1jmfb"] +[gd_resource type="CylinderMesh" load_steps=2 format=3 uid="uid://c3hxlx3k1jmfb"] + +[ext_resource type="Material" uid="uid://boc66segplbdg" path="res://addons/@bendn/gizmo3d/center.tres" id="1_bdyet"] [resource] +material = ExtResource("1_bdyet") top_radius = 1.0 bottom_radius = 1.0 height = 10.0 diff --git a/addons/@bendn/gizmo3d/translate/point.tres b/addons/@bendn/gizmo3d/translate/point.tres index 8e59ed2..d7473a3 100644 --- a/addons/@bendn/gizmo3d/translate/point.tres +++ b/addons/@bendn/gizmo3d/translate/point.tres @@ -1,6 +1,9 @@ -[gd_resource type="CylinderMesh" format=3 uid="uid://cd0844dj635dv"] +[gd_resource type="CylinderMesh" load_steps=2 format=3 uid="uid://cd0844dj635dv"] + +[ext_resource type="Material" uid="uid://boc66segplbdg" path="res://addons/@bendn/gizmo3d/center.tres" id="1_l0oix"] [resource] +material = ExtResource("1_l0oix") top_radius = 0.0 bottom_radius = 2.0 height = 3.0 diff --git a/addons/@bendn/gizmo3d/translate/translate.tscn b/addons/@bendn/gizmo3d/translate/translate.tscn index 231e7cb..5d0d5eb 100644 --- a/addons/@bendn/gizmo3d/translate/translate.tscn +++ b/addons/@bendn/gizmo3d/translate/translate.tscn @@ -12,6 +12,7 @@ [ext_resource type="Material" uid="uid://btbrwby3db6t5" path="res://addons/@bendn/gizmo3d/z.tres" id="10_4d87b"] [sub_resource type="BoxMesh" id="BoxMesh_rttof"] +material = ExtResource("3_t3mv1") size = Vector3(10, 10, 10) [sub_resource type="BoxShape3D" id="BoxShape3D_tep2a"] @@ -29,7 +30,6 @@ script = ExtResource("2_vs4q7") [node name="mesh" type="MeshInstance3D" parent="center"] mesh = SubResource("BoxMesh_rttof") skeleton = NodePath("../..") -surface_material_override/0 = ExtResource("3_t3mv1") [node name="collider" type="CollisionShape3D" parent="center"] shape = SubResource("BoxShape3D_tep2a") |