Digitalghost
New Member
Hey all,
I'm working on adding support for an overhead perspective. For inspiration, go to 1m 30s of this video:
Changing the camera angle and offset has been pretty easy, but I'm stuck on hiding blocks. Notice in the video I linked that you can move up and down in the Y axis and it slices the terrain and hides everything above a certain Y value.
Looking at the Terasology code, I was thinking of making a special collision group called UI_VISIBLE. When we use the physics engine for picking blocks to dig or other UI-based events, we only look at blocks that have this group. Also, the rendering engine needs to be aware of blocks that are hidden and draw the appropriate face on the blocks just below the hidden ones.
When the hide-layer changes, we would need to change a bunch of the blocks' collision groups and also regenerate all meshes, which is pretty expensive.
Thoughts?
I'm working on adding support for an overhead perspective. For inspiration, go to 1m 30s of this video:
Changing the camera angle and offset has been pretty easy, but I'm stuck on hiding blocks. Notice in the video I linked that you can move up and down in the Y axis and it slices the terrain and hides everything above a certain Y value.
Looking at the Terasology code, I was thinking of making a special collision group called UI_VISIBLE. When we use the physics engine for picking blocks to dig or other UI-based events, we only look at blocks that have this group. Also, the rendering engine needs to be aware of blocks that are hidden and draw the appropriate face on the blocks just below the hidden ones.
When the hide-layer changes, we would need to change a bunch of the blocks' collision groups and also regenerate all meshes, which is pretty expensive.
Thoughts?