Fixed Timestep Interpolation (2D)
Adds fixed timestep interpolation to the rendering server (2D only). Switchable on and off with a project setting (default is off). Co-authored-by: lawnjelly <lawnjelly@gmail.com>
This commit is contained in:
@ -73,6 +73,7 @@ void ParallaxLayer::_update_mirroring() {
|
||||
RID ci = get_canvas_item();
|
||||
Point2 mirrorScale = mirroring * get_scale();
|
||||
RenderingServer::get_singleton()->canvas_set_item_mirroring(c, ci, mirrorScale);
|
||||
RenderingServer::get_singleton()->canvas_item_set_interpolated(ci, false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,4 +163,6 @@ void ParallaxLayer::_bind_methods() {
|
||||
}
|
||||
|
||||
ParallaxLayer::ParallaxLayer() {
|
||||
// ParallaxLayer is always updated every frame so there is no need to interpolate.
|
||||
set_physics_interpolation_mode(Node::PHYSICS_INTERPOLATION_MODE_OFF);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user