Helper methods on `Transform`
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 161
Description
## What problem does this solve or what need does it fill?
Currently, working with a transform is cumbersome, requiring many lines to perform simple tasks. This can be seen easily in the [translation example](https://github.com/bevyengine/bevy/blob/main/examples/transforms/translation.rs):
```rust
let direction = transform.local_x();
transform.translation += direction * cube.speed * timer.delta_seconds();
```
Note that this has to be two lines instead of one, because of borrow checker issues.
## What solution would you like?
Simple methods like `translate`, `local_translate` would make such operations much simpler. The above could become
```rust
transform.local_translate(Vec3::X * cube.speed * timer.delta_seconds());
```
which is much simpler and easier to understand.
## What alternative(s) have you considered?
The original example does *work*, but as I said, it's quite cumbersome.
## Additional context
I know Unity has functions like these, although I don't know how many other engines do. Notably, Godot does not.
Contributor guide
Assessment
This issue has not been assessed yet.