Jump to content

Sprites disappear (only visual) by moving (cameras is following)


s4m_ur4i
 Share

Recommended Posts

Need some help.
I try to find what I am missing hear for days. But I don't get it.. Maybe someone of you can point me in the right direction.

A moving sprite, that is followed by the camera, disappears on "certain" areas. For example in one scene:
it disappears in the upper left and most left areas of the scene.
In some others on all areas around the borders of the world. - Tilemaps and every other object are still visible.

1. The moving sprite does not involve any alpha 0 / 1 settings
2. The moving sprite does not die/destroy
3. The moving sprite does not set any kind of BlendMode
4. The moving sprite does not set any visibility
5. There are NO overlays that could cover up the moving sprite
6. Worldbounds and main cameras bounds are set (code below)

this.physics.world.setBounds(0, 0, this.map.widthInPixels * SCALE, this.map.heightInPixels * SCALE, true, true, true, true);
this.cameras.main.setBounds(0, 0, this.map.widthInPixels * SCALE, this.map.heightInPixels * SCALE);


I also tested adding a second camera, it is the same behavior, but here I can see, any time the moving sprite disappears, the camera background is set to a different color... and I don't know why this is happening. The game's code is too much to post it all. But basically, the only thing with bounds that is set, are the two lines, I posted here.

At this time it is quite confusing and I already spend days investigating in it. I got no clue, why this is happening. Any hint is highly appreciated! :)

cheers

Link to comment
Share on other sites


I also found a post about this:


This should be fixed in version 3.11, but for me it isn't. But maybe the issue isn't the same at all.
When I set the main camera scrollX/Y the moving sprite is visible to a certain point. But if the sprite reaches the area, the startFollow method would view. the sprite disappears again.. I got no clue why this is happening.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...