summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gdnative/godot/godot_vector3.cpp5
-rw-r--r--modules/gdnative/godot/godot_vector3.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/modules/gdnative/godot/godot_vector3.cpp b/modules/gdnative/godot/godot_vector3.cpp
index f9942af6e5..adca0d1e2a 100644
--- a/modules/gdnative/godot/godot_vector3.cpp
+++ b/modules/gdnative/godot/godot_vector3.cpp
@@ -90,11 +90,12 @@ godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self) {
return dest;
}
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by) {
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by) {
godot_vector3 dest;
const Vector3 *self = (const Vector3 *)p_self;
+ const Vector3 *snap_axis = (const Vector3 *)p_by;
- *((Vector3 *)&dest) = self->snapped(p_by);
+ *((Vector3 *)&dest) = self->snapped(*snap_axis);
return dest;
}
diff --git a/modules/gdnative/godot/godot_vector3.h b/modules/gdnative/godot/godot_vector3.h
index 8e2aed8173..98d9ddf6ac 100644
--- a/modules/gdnative/godot/godot_vector3.h
+++ b/modules/gdnative/godot/godot_vector3.h
@@ -70,7 +70,7 @@ godot_vector3 GDAPI godot_vector3_normalized(const godot_vector3 *p_self);
godot_vector3 GDAPI godot_vector3_inverse(const godot_vector3 *p_self);
-godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_real p_by);
+godot_vector3 GDAPI godot_vector3_snapped(const godot_vector3 *p_self, const godot_vector3 *p_by);
godot_vector3 GDAPI godot_vector3_rotated(const godot_vector3 *p_self, const godot_vector3 *p_axis, const godot_real p_phi);