summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/bullet/bullet_physics_server.cpp8
-rw-r--r--modules/bullet/bullet_physics_server.h4
-rw-r--r--modules/bullet/rigid_body_bullet.cpp34
-rw-r--r--modules/bullet/rigid_body_bullet.h8
-rw-r--r--modules/gridmap/grid_map_editor_plugin.h1
5 files changed, 27 insertions, 28 deletions
diff --git a/modules/bullet/bullet_physics_server.cpp b/modules/bullet/bullet_physics_server.cpp
index 55686543f3..f397c53344 100644
--- a/modules/bullet/bullet_physics_server.cpp
+++ b/modules/bullet/bullet_physics_server.cpp
@@ -707,11 +707,11 @@ void BulletPhysicsServer3D::body_add_central_force(RID p_body, const Vector3 &p_
body->apply_central_force(p_force);
}
-void BulletPhysicsServer3D::body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_pos) {
+void BulletPhysicsServer3D::body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position) {
RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
- body->apply_force(p_force, p_pos);
+ body->apply_force(p_force, p_position);
}
void BulletPhysicsServer3D::body_add_torque(RID p_body, const Vector3 &p_torque) {
@@ -728,11 +728,11 @@ void BulletPhysicsServer3D::body_apply_central_impulse(RID p_body, const Vector3
body->apply_central_impulse(p_impulse);
}
-void BulletPhysicsServer3D::body_apply_impulse(RID p_body, const Vector3 &p_pos, const Vector3 &p_impulse) {
+void BulletPhysicsServer3D::body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position) {
RigidBodyBullet *body = rigid_body_owner.getornull(p_body);
ERR_FAIL_COND(!body);
- body->apply_impulse(p_pos, p_impulse);
+ body->apply_impulse(p_impulse, p_position);
}
void BulletPhysicsServer3D::body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse) {
diff --git a/modules/bullet/bullet_physics_server.h b/modules/bullet/bullet_physics_server.h
index 558d1ce5f7..8e8b33a4b8 100644
--- a/modules/bullet/bullet_physics_server.h
+++ b/modules/bullet/bullet_physics_server.h
@@ -223,11 +223,11 @@ public:
virtual Vector3 body_get_applied_torque(RID p_body) const;
virtual void body_add_central_force(RID p_body, const Vector3 &p_force);
- virtual void body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_pos);
+ virtual void body_add_force(RID p_body, const Vector3 &p_force, const Vector3 &p_position = Vector3());
virtual void body_add_torque(RID p_body, const Vector3 &p_torque);
virtual void body_apply_central_impulse(RID p_body, const Vector3 &p_impulse);
- virtual void body_apply_impulse(RID p_body, const Vector3 &p_pos, const Vector3 &p_impulse);
+ virtual void body_apply_impulse(RID p_body, const Vector3 &p_impulse, const Vector3 &p_position = Vector3());
virtual void body_apply_torque_impulse(RID p_body, const Vector3 &p_impulse);
virtual void body_set_axis_velocity(RID p_body, const Vector3 &p_axis_velocity);
diff --git a/modules/bullet/rigid_body_bullet.cpp b/modules/bullet/rigid_body_bullet.cpp
index 9aac7ba9e4..6cfbe18a64 100644
--- a/modules/bullet/rigid_body_bullet.cpp
+++ b/modules/bullet/rigid_body_bullet.cpp
@@ -118,8 +118,8 @@ void BulletPhysicsDirectBodyState3D::add_central_force(const Vector3 &p_force) {
body->apply_central_force(p_force);
}
-void BulletPhysicsDirectBodyState3D::add_force(const Vector3 &p_force, const Vector3 &p_pos) {
- body->apply_force(p_force, p_pos);
+void BulletPhysicsDirectBodyState3D::add_force(const Vector3 &p_force, const Vector3 &p_position) {
+ body->apply_force(p_force, p_position);
}
void BulletPhysicsDirectBodyState3D::add_torque(const Vector3 &p_torque) {
@@ -130,8 +130,8 @@ void BulletPhysicsDirectBodyState3D::apply_central_impulse(const Vector3 &p_impu
body->apply_central_impulse(p_impulse);
}
-void BulletPhysicsDirectBodyState3D::apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse) {
- body->apply_impulse(p_pos, p_impulse);
+void BulletPhysicsDirectBodyState3D::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
+ body->apply_impulse(p_impulse, p_position);
}
void BulletPhysicsDirectBodyState3D::apply_torque_impulse(const Vector3 &p_impulse) {
@@ -604,23 +604,23 @@ Variant RigidBodyBullet::get_state(PhysicsServer3D::BodyState p_state) const {
}
void RigidBodyBullet::apply_central_impulse(const Vector3 &p_impulse) {
- btVector3 btImpu;
- G_TO_B(p_impulse, btImpu);
+ btVector3 btImpulse;
+ G_TO_B(p_impulse, btImpulse);
if (Vector3() != p_impulse) {
btBody->activate();
}
- btBody->applyCentralImpulse(btImpu);
+ btBody->applyCentralImpulse(btImpulse);
}
-void RigidBodyBullet::apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse) {
- btVector3 btImpu;
- btVector3 btPos;
- G_TO_B(p_impulse, btImpu);
- G_TO_B(p_pos, btPos);
+void RigidBodyBullet::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
+ btVector3 btImpulse;
+ btVector3 btPosition;
+ G_TO_B(p_impulse, btImpulse);
+ G_TO_B(p_position, btPosition);
if (Vector3() != p_impulse) {
btBody->activate();
}
- btBody->applyImpulse(btImpu, btPos);
+ btBody->applyImpulse(btImpulse, btPosition);
}
void RigidBodyBullet::apply_torque_impulse(const Vector3 &p_impulse) {
@@ -632,15 +632,15 @@ void RigidBodyBullet::apply_torque_impulse(const Vector3 &p_impulse) {
btBody->applyTorqueImpulse(btImp);
}
-void RigidBodyBullet::apply_force(const Vector3 &p_force, const Vector3 &p_pos) {
+void RigidBodyBullet::apply_force(const Vector3 &p_force, const Vector3 &p_position) {
btVector3 btForce;
- btVector3 btPos;
+ btVector3 btPosition;
G_TO_B(p_force, btForce);
- G_TO_B(p_pos, btPos);
+ G_TO_B(p_position, btPosition);
if (Vector3() != p_force) {
btBody->activate();
}
- btBody->applyForce(btForce, btPos);
+ btBody->applyForce(btForce, btPosition);
}
void RigidBodyBullet::apply_central_force(const Vector3 &p_force) {
diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h
index 6d159504b8..ddc9d2916a 100644
--- a/modules/bullet/rigid_body_bullet.h
+++ b/modules/bullet/rigid_body_bullet.h
@@ -111,10 +111,10 @@ public:
virtual Transform get_transform() const;
virtual void add_central_force(const Vector3 &p_force);
- virtual void add_force(const Vector3 &p_force, const Vector3 &p_pos);
+ virtual void add_force(const Vector3 &p_force, const Vector3 &p_position = Vector3());
virtual void add_torque(const Vector3 &p_torque);
virtual void apply_central_impulse(const Vector3 &p_impulse);
- virtual void apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse);
+ virtual void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3());
virtual void apply_torque_impulse(const Vector3 &p_impulse);
virtual void set_sleep_state(bool p_sleep);
@@ -284,12 +284,12 @@ public:
void set_state(PhysicsServer3D::BodyState p_state, const Variant &p_variant);
Variant get_state(PhysicsServer3D::BodyState p_state) const;
- void apply_impulse(const Vector3 &p_pos, const Vector3 &p_impulse);
void apply_central_impulse(const Vector3 &p_impulse);
+ void apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position = Vector3());
void apply_torque_impulse(const Vector3 &p_impulse);
- void apply_force(const Vector3 &p_force, const Vector3 &p_pos);
void apply_central_force(const Vector3 &p_force);
+ void apply_force(const Vector3 &p_force, const Vector3 &p_position = Vector3());
void apply_torque(const Vector3 &p_torque);
void set_applied_force(const Vector3 &p_force);
diff --git a/modules/gridmap/grid_map_editor_plugin.h b/modules/gridmap/grid_map_editor_plugin.h
index 0ae9b27833..31a01cdc91 100644
--- a/modules/gridmap/grid_map_editor_plugin.h
+++ b/modules/gridmap/grid_map_editor_plugin.h
@@ -33,7 +33,6 @@
#include "editor/editor_node.h"
#include "editor/editor_plugin.h"
-#include "editor/pane_drag.h"
#include "grid_map.h"
class Node3DEditorPlugin;