Question about Object layer positioning (Isometric) #25
-
Hi! First of all, thank you for this amazing library—it's a really cool project. I'm relatively new to Bevy game development, especially when it comes to working with isometric layouts, so it's possible I'm missing something obvious. I’m reaching out for guidance on troubleshooting an issue I’m facing with object layers registered through Map setup:fn setup_tilemap(mut commands: Commands, asset_server: Res<AssetServer>) {
let map_handle: Handle<TiledMap> = asset_server.load("level0.tmx");
commands.spawn((
TiledMapBundle {
tiled_map: map_handle,
render_settings: TilemapRenderSettings {
render_chunk_size: UVec2::new(1, 1),
y_sort: true,
},
tiled_settings: TiledMapSettings {
map_positioning: MapPositioning::Centered,
collider_callback: |entity_commands| {
entity_commands.insert(RigidBody::Static);
},
..default()
},
..Default::default()
},
Level,
));
} Object registration:pub struct TerrainPlugin;
impl Plugin for TerrainPlugin {
fn build(&self, app: &mut App) {
app
.register_tiled_object::<TileWallObj>("wall");
}
}
#[derive(TiledObject, Component, Default, Reflect, Debug)]
pub struct TileWallObj {} Positioning problemExpected in Tiled:Inside of BevyIs this working correctly and I need to like do some equation to get back the position I'm expecting? If so, is there an example somewhere that could give me an idea of the implementation. Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey! Sorry, never saw the discussion until I got the notification you closed it... From what I understand you have an issue with Tiled object not being at the correct position for isometric maps. If you are using "diamond" isometric map, it should be fixed in Please, let me know if it works for you! Thanks! |
Beta Was this translation helpful? Give feedback.
Hey!
Sorry, never saw the discussion until I got the notification you closed it...
Still a bit new to Gihub!
From what I understand you have an issue with Tiled object not being at the correct position for isometric maps.
Indeed, it was quite buggy.
If you are using "diamond" isometric map, it should be fixed in
dev
branch, following this commit, although there are still issues regarding physics colliders.If you are using "staggered" isometric map, unfortunately there is still an issue and I choose not to fix it right now and keep it as a limitation of the crate (there should be a warning message).
Please, let me know if it works for you!
Also, if you encounter any issue, feel free to op…