Properly pass safe margin on initialization.
Fixes jitter.
This commit is contained in:
parent
2921827387
commit
13e0385702
|
@ -1241,12 +1241,12 @@ void KinematicBody3D::_direct_state_changed(Object *p_state) {
|
||||||
|
|
||||||
KinematicBody3D::KinematicBody3D() :
|
KinematicBody3D::KinematicBody3D() :
|
||||||
PhysicsBody3D(PhysicsServer3D::BODY_MODE_KINEMATIC) {
|
PhysicsBody3D(PhysicsServer3D::BODY_MODE_KINEMATIC) {
|
||||||
margin = 0.001;
|
|
||||||
locked_axis = 0;
|
locked_axis = 0;
|
||||||
on_floor = false;
|
on_floor = false;
|
||||||
on_ceiling = false;
|
on_ceiling = false;
|
||||||
on_wall = false;
|
on_wall = false;
|
||||||
|
|
||||||
|
set_safe_margin(0.001);
|
||||||
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
|
PhysicsServer3D::get_singleton()->body_set_force_integration_callback(get_rid(), this, "_direct_state_changed");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -750,7 +750,7 @@ Body3DSW::Body3DSW() :
|
||||||
active = true;
|
active = true;
|
||||||
|
|
||||||
mass = 1;
|
mass = 1;
|
||||||
kinematic_safe_margin = 0.01;
|
kinematic_safe_margin = 0.001;
|
||||||
//_inv_inertia=Transform();
|
//_inv_inertia=Transform();
|
||||||
_inv_mass = 1;
|
_inv_mass = 1;
|
||||||
bounce = 0;
|
bounce = 0;
|
||||||
|
|
Loading…
Reference in New Issue