-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add Transform::look_to
#6692
Conversation
Docs could be clearer: it's hard when reading to understand how this compares and contrasts to |
/// vector in the local negative `Z` direction is toward `target` and its | ||
/// unit vector in the local `Y` direction is toward `up`. | ||
/// Returns this [`Transform`] with a new rotation so that [`Transform::forward`] | ||
/// points towards the `target` position and [`Transform::up`] points towards `up`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO we should also keep the local z etc explanations, probably in parentheticals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is already documented on the linked methods. I'd rather avoid repeating the documentation.
Although, since rust-analyzer doesn't support these links it does kinda suck. hmmmm
|
Ah, I see! Hard without changing the names. |
I feel my suggestion ( |
Co-authored-by: François <mockersf@gmail.com>
bors r+ |
Add a method to rotate a transform to point towards a direction. Also updated the docs to link to `forward` and `up` instead of mentioning local negative `Z` and local `Y`. Unfortunately, links to methods don't work in rust-analyzer :( Co-authored-by: Devil Ira <justthecooldude@gmail.com>
Transform::look_to
Transform::look_to
Add a method to rotate a transform to point towards a direction. Also updated the docs to link to `forward` and `up` instead of mentioning local negative `Z` and local `Y`. Unfortunately, links to methods don't work in rust-analyzer :( Co-authored-by: Devil Ira <justthecooldude@gmail.com>
Add a method to rotate a transform to point towards a direction. Also updated the docs to link to `forward` and `up` instead of mentioning local negative `Z` and local `Y`. Unfortunately, links to methods don't work in rust-analyzer :( Co-authored-by: Devil Ira <justthecooldude@gmail.com>
Add a method to rotate a transform to point towards a direction. Also updated the docs to link to `forward` and `up` instead of mentioning local negative `Z` and local `Y`. Unfortunately, links to methods don't work in rust-analyzer :( Co-authored-by: Devil Ira <justthecooldude@gmail.com>
Add a method to rotate a transform to point towards a direction.
Also updated the docs to link to
forward
andup
instead of mentioning local negativeZ
and localY
.Unfortunately, links to methods don't work in rust-analyzer :(