Interpolation exploration#28
Open
ThierryBerger wants to merge 7 commits into
Open
Conversation
065af11 to
8e616d9
Compare
1 task
ThierryBerger
commented
Nov 25, 2024
Comment on lines
+17
to
+21
| .insert_resource(TimestepMode::Variable { | ||
| max_dt: 100f32, | ||
| time_scale: 1f32, | ||
| substeps: 10, | ||
| }) |
Owner
Author
There was a problem hiding this comment.
This ends up in a warning recommending using fixed timestamp, but that doesn´t make much sense because then we use Time<Fixed> ; also, TimestepMode::Variable allows us to modify time_scale.
| .add_plugins(( | ||
| DefaultPlugins, | ||
| TransformInterpolationPlugin::default(), | ||
| RapierPhysicsPlugin::<NoUserData>::pixels_per_meter(100.0).in_fixed_schedule(), |
Owner
Author
There was a problem hiding this comment.
bevy_transform_interpolation wouldn't work if we used Update ; but it makes no sense to interpolate when using Update schedule.
Comment on lines
+164
to
+177
| DebugRenderObject::RigidBody(h, ..) => { | ||
| let Some(collider) = self.context.bodies.get(h) else { | ||
| return false; | ||
| }; | ||
| let entity = Entity::from_bits(collider.user_data as u64); | ||
|
|
||
| let collider_debug = | ||
| if let Ok(collider_override) = self.override_visibility.get(entity) { | ||
| *collider_override | ||
| } else { | ||
| self.default_collider_debug | ||
| }; | ||
| collider_debug == ColliderDebug::AlwaysRender | ||
| } |
Owner
Author
There was a problem hiding this comment.
This is outside of this PR's scope, but helps with suppressing debug drawing for rigidbodies ; we could parameterize more the ColliderDebug but I'm leaving it as a future exercise on user feedback for now.
8e616d9 to
66c0b2e
Compare
ThierryBerger
commented
Nov 25, 2024
Owner
Author
There was a problem hiding this comment.
This example should be added to scraped examples
fd85257 to
ab4fc3c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current interpolation within
bevy_rapieris complex to understand in which schedules it takes place, and how it interact with those. Using bevy_transform_interpolate could help with simplifying bevy_rapier codebase and offer a better experience for users.Screencast.from.11-25-2024.04.11.24.PM.webm