The coordinate system is +Y up, and the camera looks toward -Z
A component must be registered before used. It is registerd automatically in the setup function by the System trait. If, for any reason, the component is not yet used by any system, you can register it using the below code, and thus avoid panics.
world.register::<MyComponent>()
To create a new primitive mesh is possible to use the following helper:
use amethyst::renderer::Shape;
let sphere_mesh_data : types::MeshData = Shape::Sphere(32, 32)
.generate::<(Vec<Position>, Vec<Normal>, Vec<Tangent>, Vec<TexCoord>)>(None)
.into();
Is it also important to notice that to be visualized the mesh must have a valid material attached to it.
Is possible to Add, Remove, entities within the systems. Is also possible Remove or Add components to a particular entity inside a system.
https://github.com/AndreaCatania/amt_tests/blob/master/cubes/src/impulse_system.rs#L42-L53
Of curse is possible to do so even out of the systems, but an extra step is required. You must take the compoent Storages or use the below code:
WriteStorage::<Component>::fetch(&world).insert(entity, component)
WriteStorage::<Component>::fetch(&world).remove(entity)
Is possible to populate a BitSet with entity indices and use it to filter a storage. This is a good example on how do it