Merge pull request #52967 from danger-dan/dev_vehicle_sleep_fix
This commit is contained in:
commit
fb4fadfd1e
2 changed files with 16 additions and 0 deletions
|
@ -59,6 +59,7 @@ real_t PhysicsDirectBodyState2DSW::get_inverse_inertia() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::set_linear_velocity(const Vector2 &p_velocity) {
|
void PhysicsDirectBodyState2DSW::set_linear_velocity(const Vector2 &p_velocity) {
|
||||||
|
body->set_active(true);
|
||||||
body->set_linear_velocity(p_velocity);
|
body->set_linear_velocity(p_velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +68,7 @@ Vector2 PhysicsDirectBodyState2DSW::get_linear_velocity() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::set_angular_velocity(real_t p_velocity) {
|
void PhysicsDirectBodyState2DSW::set_angular_velocity(real_t p_velocity) {
|
||||||
|
body->set_active(true);
|
||||||
body->set_angular_velocity(p_velocity);
|
body->set_angular_velocity(p_velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,26 +89,32 @@ Vector2 PhysicsDirectBodyState2DSW::get_velocity_at_local_position(const Vector2
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::add_central_force(const Vector2 &p_force) {
|
void PhysicsDirectBodyState2DSW::add_central_force(const Vector2 &p_force) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_central_force(p_force);
|
body->add_central_force(p_force);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::add_force(const Vector2 &p_force, const Vector2 &p_position) {
|
void PhysicsDirectBodyState2DSW::add_force(const Vector2 &p_force, const Vector2 &p_position) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_force(p_force, p_position);
|
body->add_force(p_force, p_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::add_torque(real_t p_torque) {
|
void PhysicsDirectBodyState2DSW::add_torque(real_t p_torque) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_torque(p_torque);
|
body->add_torque(p_torque);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::apply_central_impulse(const Vector2 &p_impulse) {
|
void PhysicsDirectBodyState2DSW::apply_central_impulse(const Vector2 &p_impulse) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_central_impulse(p_impulse);
|
body->apply_central_impulse(p_impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position) {
|
void PhysicsDirectBodyState2DSW::apply_impulse(const Vector2 &p_impulse, const Vector2 &p_position) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_impulse(p_impulse, p_position);
|
body->apply_impulse(p_impulse, p_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState2DSW::apply_torque_impulse(real_t p_torque) {
|
void PhysicsDirectBodyState2DSW::apply_torque_impulse(real_t p_torque) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_torque_impulse(p_torque);
|
body->apply_torque_impulse(p_torque);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,7 @@ Basis PhysicsDirectBodyState3DSW::get_inverse_inertia_tensor() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::set_linear_velocity(const Vector3 &p_velocity) {
|
void PhysicsDirectBodyState3DSW::set_linear_velocity(const Vector3 &p_velocity) {
|
||||||
|
body->set_active(true);
|
||||||
body->set_linear_velocity(p_velocity);
|
body->set_linear_velocity(p_velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,6 +75,7 @@ Vector3 PhysicsDirectBodyState3DSW::get_linear_velocity() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::set_angular_velocity(const Vector3 &p_velocity) {
|
void PhysicsDirectBodyState3DSW::set_angular_velocity(const Vector3 &p_velocity) {
|
||||||
|
body->set_active(true);
|
||||||
body->set_angular_velocity(p_velocity);
|
body->set_angular_velocity(p_velocity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,26 +96,32 @@ Vector3 PhysicsDirectBodyState3DSW::get_velocity_at_local_position(const Vector3
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::add_central_force(const Vector3 &p_force) {
|
void PhysicsDirectBodyState3DSW::add_central_force(const Vector3 &p_force) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_central_force(p_force);
|
body->add_central_force(p_force);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::add_force(const Vector3 &p_force, const Vector3 &p_position) {
|
void PhysicsDirectBodyState3DSW::add_force(const Vector3 &p_force, const Vector3 &p_position) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_force(p_force, p_position);
|
body->add_force(p_force, p_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::add_torque(const Vector3 &p_torque) {
|
void PhysicsDirectBodyState3DSW::add_torque(const Vector3 &p_torque) {
|
||||||
|
body->set_active(true);
|
||||||
body->add_torque(p_torque);
|
body->add_torque(p_torque);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::apply_central_impulse(const Vector3 &p_impulse) {
|
void PhysicsDirectBodyState3DSW::apply_central_impulse(const Vector3 &p_impulse) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_central_impulse(p_impulse);
|
body->apply_central_impulse(p_impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
|
void PhysicsDirectBodyState3DSW::apply_impulse(const Vector3 &p_impulse, const Vector3 &p_position) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_impulse(p_impulse, p_position);
|
body->apply_impulse(p_impulse, p_position);
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsDirectBodyState3DSW::apply_torque_impulse(const Vector3 &p_impulse) {
|
void PhysicsDirectBodyState3DSW::apply_torque_impulse(const Vector3 &p_impulse) {
|
||||||
|
body->set_active(true);
|
||||||
body->apply_torque_impulse(p_impulse);
|
body->apply_torque_impulse(p_impulse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue