Replies: 2 comments 4 replies
-
What are you actually trying to do? I think you might have some misconception about the ECS. What do you mean by "storing in sprite bundle"? Bundles only exist for a very short time. Once the components are written to the ECS, the bundle doesn't exist anymore. You have an What do you intend to do when you say "i need to multiply rotation by pi"? What do you mean "configure spritebundles to source position from somewhere else"? I don't understand. Could you precise what you want to do? |
Beta Was this translation helpful? Give feedback.
-
I think I pretty much got the basis now, but there's still the initialization question. Even tho components are stored just on entities, when you init you still need to write something like let test = testbundle {
something: SomeComponent,
display: SpriteBundle {
transform: Transform::from_translation(...).with_scale(...),
..default();
}
} which works but looks odd cuz there are properties in the spritebundle which are purely display-related (e.g. texture) and there is stuff that actually matters, like transform. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm currently making a project where i need to store objects with
SpriteBundle
s . However storing position and rotation directly in spritebundles is inconvenient for me (as i need to multiply rotation by pi for example). Can i configure spritebundles to source position from somewhere else or do i think entirely wrong about ECS?Beta Was this translation helpful? Give feedback.
All reactions