Existing entities blinking/disappearing on adding new entity
See original GitHub issueI have the following scene I am using within my game. It’s a simple Tiled Map with a single button ‘UI’. I start the scene with some entities and have my update method spawn new entities on click. The spawned entities on initialization are placed on the tiled map properly but when added by mouse click, the existing and new entities just blink after each click. The debug borders around the entities are still visible but the sprites of the entities blink. Is this a bug?
public class GameScene : Scene
{
public override void initialize()
{
// Set scene background color
clearColor = Color.Black;
Core.debugRenderEnabled = true;
// Set camera zoom
camera.setZoom(1);
// Add the renderers
addRenderer(new ScreenSpaceRenderer(100, UI.UI_RENDER_LAYER));
addRenderer(new RenderLayerExcludeRenderer(0, UI.UI_RENDER_LAYER));
var map = content.Load<TiledMap>("maps/Fardia");
addEntity(new UI());
addEntity(new Map(map));
addEntity(new God());
for (int i = 0; i < 100; i++)
{
var position = Nez.Random.range(new Vector2(10, 10), new Vector2(100, 100));
addEntity(new Human()
{
position = position
});
}
}
public override void update()
{
base.update();
if (Input.leftMouseButtonPressed)
{
addEntity(new Human()
{
position = camera.mouseToWorldPoint().round()
});
}
}
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (2 by maintainers)
Top Results From Across the Web
document.createElement flashes up with what I want. Then ...
Then it is disappearing. Just the message, not the entire thing, but that sometimes happens as well. What has happened and how can...
Read more >Components of animation flicker and disappear/reappear
The objects appearing and disappearing is a problem with the clipping distance of the camera. Select the camera and make the clipping start ......
Read more >Custom Secondary Info for Entities Card
The flicker is the result of an update - during the update process, it starts by rendering the 'standard' entity row, which does...
Read more >Flickering props, invisible vehicles and disappearing trees
I have tested on a new map and there is no flickering props or disappearing trees. I have tested an old save of...
Read more >Mouse cursor flickering and disappearing
I had the same problem. You can fix it manually. Open System Settings > Displays. In the Displays window, you will see an...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It was all me then… @SolarOmni thanks for your great example!
Closing out all old Nez bugs without recent activity. If you are still seeing any issues feel free to open a new bug and include a full repro project that clearly shows the issue.