Transform methods `look_to` and `look_at` are confusing
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## How can Bevy's documentation be improved?
What's the difference between "looking at smth" and "looking to smth"?
Difficult to tell… Yet Transform has two distinct methods on Transform called look_to and look_at. One considers the argument a relative position to look toward (a direction), the other considers the argument as an absolute position to look toward (a position).
Code review during #6692 said that `look_to` could lead to confusion.
### Solution
I thought about this a bit, and there isn't a perfect solution.
However, I suggest replacing `look_to` by `look_in`. Why? Because it's grammatically incorrect to say "look in enemy", but it's grammatically correct to say "look in direction".
Contributor guide
Research direction
Start with the Transform::look_to and Transform::look_at APIs and their documentation to understand how direction and position arguments are described. Evaluate whether the proposed look_in name resolves the confusion, and consider the affected API references; done means the naming and documentation change are agreed and the distinction is clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100