Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support Transform interpolation #444

Closed
Tracked by #433 ...
janhohenheim opened this issue Jul 17, 2024 · 1 comment · Fixed by #566
Closed
Tracked by #433 ...

Support Transform interpolation #444

janhohenheim opened this issue Jul 17, 2024 · 1 comment · Fixed by #566
Labels
C-Enhancement New feature or request
Milestone

Comments

@janhohenheim
Copy link
Contributor

janhohenheim commented Jul 17, 2024

@Jondolf Jondolf added the C-Enhancement New feature or request label Jul 19, 2024
@Jondolf Jondolf added this to the 0.2 milestone Aug 23, 2024
@janhohenheim
Copy link
Contributor Author

See my crate avian_interpolation for a suggestion for how to handle this. It's not fit for being directly upstreamed as it completely removes the transform sync, which would be a much more controversial change, but it should be a good starting point. Another option is to just use bevy_transform_interpolation and accept the fact that it necessarily stores redundant data.

Jondolf pushed a commit that referenced this issue Sep 26, 2024
# Objective

For [`avian_interpolation`](https://github.com/janhohenheim/avian_interpolation), I want to have a clean separation between gameplay transforms and render transforms. Avian's best version of a gameplay scale is currently `Collider::scale`. However, this is not ergonomically interpolatable due to two reasons:
- `Collider::scale` is not initialized with the right scale, meaning that my observers that listen for its insertion will read wrong initial data, and
- It is automatically synced to the `GlobalTransform`, making it hard to change the `Transform` according to the `Collider::scale` without affecting it back in turn

Related to #444 

## Solution

- Set the `Collider::scale` correctly in its `on_add` hook
- Allow an opt-out via `SyncConfig`

---

## Changelog

- You can now opt-out of `Transform` to `Collider::scale` syncing by using the new `SyncConfig::transform_to_collider_scale` field.
@Jondolf Jondolf closed this as completed in aeeb856 Dec 7, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
C-Enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants