summaryrefslogtreecommitdiff
path: root/servers
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-04-05 17:47:13 -0500
committerFerenc Arn <tagcup@yahoo.com>2017-04-06 13:03:56 -0500
commit9a37ff1e34fe445a9168a7d91ae1df7d9928eb25 (patch)
treef524cd3d1fd4c31e7e1fe868eea45d3d3086c2f6 /servers
parent454f53c77659721a529c48fd4be6bf80d33c0082 (diff)
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.
Diffstat (limited to 'servers')
-rw-r--r--servers/physics/body_sw.cpp4
1 files changed, 2 insertions, 2 deletions
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;