You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-12-02 16:48:55 +00:00
Physics Interpolation - refactor Camera and fix get_camera_transform()
* Moves 3D Camera interpolation scene side. * Automatically switches `get_camera_transform()` to report interpolated transform during `_process()`. * Fixes `ClippedCamera` to work with physics interpolation.
This commit is contained in:
@@ -900,14 +900,6 @@ void CPUParticles::_particles_process(float p_delta) {
|
||||
p.velocity.z = 0.0;
|
||||
p.transform.origin.z = 0.0;
|
||||
}
|
||||
|
||||
// Teleport if starting a new particle, so
|
||||
// we don't get a streak from the old position
|
||||
// to this new start.
|
||||
if (_interpolated) {
|
||||
p.copy_to(particles_prev[i]);
|
||||
}
|
||||
|
||||
} else if (!p.active) {
|
||||
continue;
|
||||
} else if (p.time > p.lifetime) {
|
||||
@@ -1012,6 +1004,13 @@ void CPUParticles::_particles_process(float p_delta) {
|
||||
}
|
||||
|
||||
p.transform.origin += p.velocity * local_delta;
|
||||
|
||||
// Teleport if starting a new particle, so
|
||||
// we don't get a streak from the old position
|
||||
// to this new start.
|
||||
if (restart && _interpolated) {
|
||||
p.copy_to(particles_prev[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user