-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Adding QoL extensions to Transforms #501
Copy link
Copy link
Closed
Labels
C-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy
Description
I'd like Transforms to have some QoL methods (examples will follow), and would like to hear what the sentiment towards that would be (I know we want to be careful with implementing too many new features).
Here is my wishlist (much of these are influenced by Unity's Transforms:
Transform::forward() -> Vec3Get the normalized direction pointing towards in model-spaceTransform::look_at(&mut self, &Vec3)Rotate the Transform, so that it looks at a certain position- General methods to rotate the Transform e.g. around a certain axis, or orbit around a certain point. Those could be better kept as constructors for
Quat, though. Transform::face_towards(&mut self, ..) -> Selfsame asTransform::new(Mat4::face_towards(..))but minimizes the amount ofMat4s the average user has to deal withTransform::apply(&mut self, other: &Transform)transform yourtransformby anothertransform;)- I'm sure more will come to mind later
The mutable methods would also only be implemented on Transform but not on GlobalTransform (although refining the difference between Global- and Transform could be another Issue).
If everyone's on board I'd like to use this issue to collect wanted features for Transforms and open a pull request to implement them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-FeatureA new feature, making something new possibleA new feature, making something new possibleC-UsabilityA targeted quality-of-life change that makes Bevy easier to useA targeted quality-of-life change that makes Bevy easier to useD-TrivialNice and easy! A great choice to get started with BevyNice and easy! A great choice to get started with Bevy