Merge pull request #53118 from BimDav/physicsbody_to_kinematic
Reload kinematic shapes when changing PhysicsBody mode to Kinematic
This commit is contained in:
commit
27417c065d
@ -303,6 +303,7 @@ RigidBodyBullet::~RigidBodyBullet() {
|
|||||||
|
|
||||||
void RigidBodyBullet::init_kinematic_utilities() {
|
void RigidBodyBullet::init_kinematic_utilities() {
|
||||||
kinematic_utilities = memnew(KinematicUtilities(this));
|
kinematic_utilities = memnew(KinematicUtilities(this));
|
||||||
|
reload_kinematic_shapes();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RigidBodyBullet::destroy_kinematic_utilities() {
|
void RigidBodyBullet::destroy_kinematic_utilities() {
|
||||||
|
@ -947,7 +947,6 @@ bool SpaceBullet::test_body_motion(RigidBodyBullet *p_body, const Transform3D &p
|
|||||||
|
|
||||||
if (!p_body->get_kinematic_utilities()) {
|
if (!p_body->get_kinematic_utilities()) {
|
||||||
p_body->init_kinematic_utilities();
|
p_body->init_kinematic_utilities();
|
||||||
p_body->reload_kinematic_shapes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
btVector3 initial_recover_motion(0, 0, 0);
|
btVector3 initial_recover_motion(0, 0, 0);
|
||||||
@ -1089,7 +1088,6 @@ int SpaceBullet::test_ray_separation(RigidBodyBullet *p_body, const Transform3D
|
|||||||
|
|
||||||
if (!p_body->get_kinematic_utilities()) {
|
if (!p_body->get_kinematic_utilities()) {
|
||||||
p_body->init_kinematic_utilities();
|
p_body->init_kinematic_utilities();
|
||||||
p_body->reload_kinematic_shapes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
btVector3 recover_motion(0, 0, 0);
|
btVector3 recover_motion(0, 0, 0);
|
||||||
|
Loading…
Reference in New Issue
Block a user