-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add system parameter for computing up-to-date GlobalTransform
s
#8603
Add system parameter for computing up-to-date GlobalTransform
s
#8603
Conversation
This could be very useful for implementing inverse kinematics for animation systems. Added the |
/// you use the [`GlobalTransform`] component stored on the entity, unless you need | ||
/// a [`GlobalTransform`] that reflects the changes made to any [`Transform`]s since | ||
/// the last time the transform propagation systems ran. | ||
#[derive(SystemParam)] |
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.
Should probably mention that this takes read access on Parent
and Transform
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.
made one minor suggestion. Not blocking.
} | ||
} | ||
|
||
fn map_error(err: QueryEntityError, ancestor: bool) -> ComputeGlobalTransformError { |
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.
should we use a const generic for ancestor?
} | ||
|
||
/// Error returned by [`TransformHelper::compute_global_transform`]. | ||
#[derive(Debug)] |
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.
Not sure how important but would be nice to derive Error on all error things :)
@devil-ira CI failures look real: could you fix it up? |
Co-authored-by: Noah <noahshomette@gmail.com>
…yengine#8603) # Objective Add a way to easily compute the up-to-date `GlobalTransform` of an entity. ## Solution Add the `TransformHelper`(Name pending) system parameter with the `compute_global_transform` method that takes an `Entity` and returns a `GlobalTransform` if successful. ## Changelog - Added the `TransformHelper` system parameter for computing the up-to-date `GlobalTransform` of an entity. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Noah <noahshomette@gmail.com>
…yengine#8603) # Objective Add a way to easily compute the up-to-date `GlobalTransform` of an entity. ## Solution Add the `TransformHelper`(Name pending) system parameter with the `compute_global_transform` method that takes an `Entity` and returns a `GlobalTransform` if successful. ## Changelog - Added the `TransformHelper` system parameter for computing the up-to-date `GlobalTransform` of an entity. --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com> Co-authored-by: Noah <noahshomette@gmail.com>
Objective
Add a way to easily compute the up-to-date
GlobalTransform
of an entity.Solution
Add the
TransformHelper
(Name pending) system parameter with thecompute_global_transform
method that takes anEntity
and returns aGlobalTransform
if successful.Changelog
TransformHelper
system parameter for computing the up-to-dateGlobalTransform
of an entity.