Skip to content

How to Design 2D, Translation Only, Transform System #1620

Answered by zicklag
zicklag asked this question in Q&A
Discussion options

You must be logged in to vote

So for my system I'm currently going with an experimental strategy that is designed to save me as much coding ( and corresponding technical know-how and potential bugs 😁 ) as possible.

Using the petgraph crate, I create a SceneGraph resource that can be used to allocate nodes in the scene hierarchy. You then add SceneNode components and attach them to your entities to put them in the hierarchy. Then the transform propagation system is ultra-simple because it can simply traverse the graph to update the nodes.

It was super easy to setup and worked almost the first time I got it compiling!

I'm not sure how it compares to bevy's transform propagation system in performance, but I feel like it …

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@zicklag
Comment options

zicklag Mar 14, 2021
Collaborator Author

@alice-i-cecile
Comment options

@cart
Comment options

@cart
Comment options

@zicklag
Comment options

zicklag Mar 14, 2021
Collaborator Author

Comment options

zicklag
Mar 14, 2021
Collaborator Author

You must be logged in to vote
0 replies
Answer selected by zicklag
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants