From 9a37ff1e34fe445a9168a7d91ae1df7d9928eb25 Mon Sep 17 00:00:00 2001 From: Ferenc Arn Date: Wed, 5 Apr 2017 17:47:13 -0500 Subject: Added various functions basic math classes. Also enabled math checks only for debug builds. Added set_scale, set_rotation_euler, set_rotation_axis_angle. Addresses #2565 directly. Added an euler angle constructor for Basis in GDScript and also exposed is_normalized for vectors and quaternions. Various other changes mostly cosmetic in nature. --- servers/physics/body_sw.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'servers') diff --git a/servers/physics/body_sw.cpp b/servers/physics/body_sw.cpp index 6b43ec31aa..e7f152767d 100644 --- a/servers/physics/body_sw.cpp +++ b/servers/physics/body_sw.cpp @@ -494,7 +494,7 @@ void BodySW::integrate_forces(real_t p_step) { Vector3 axis; real_t angle; - rot.get_axis_and_angle(axis, angle); + rot.get_axis_angle(axis, angle); axis.normalize(); angular_velocity = axis.normalized() * (angle / p_step); @@ -637,7 +637,7 @@ void BodySW::simulate_motion(const Transform& p_xform,real_t p_step) { Vector3 axis; real_t angle; - rot.get_axis_and_angle(axis,angle); + rot.get_axis_angle(axis,angle); axis.normalize(); angular_velocity=axis.normalized() * (angle/p_step); linear_velocity = (p_xform.origin - get_transform().origin)/p_step; -- cgit v1.2.3