Quantcast
Viewing all articles
Browse latest Browse all 6821

Aether.Physics2D and camera follow let textures flickering

@EnemyArea wrote:

Hey guys,

I've got some strange issues with my camera and the Aether.Physics2D.
I debugged it and got some results which explains why my textures are flickering.
First, I used that texture:

now I want to follow my character with my camera. the character is a physics body which I push around.
after the physics step I take the Position and multiply it with 100 to get the new position for the camera.
But my camera got positions like this:

{X: 2,357056 Y: 2,356934}
{X: 2,357056 Y: 2,357056}
{X: 2,357178 Y: 2,357056}
{X: 2,357056 Y: 2,356934}
{X: 2,357178 Y: 2,357056}
{X: 2,357056 Y: 2,356934}
{X: 2,357056 Y: 2,357056}
{X: 2,357178 Y: 2,357056}
{X: 2,357056 Y: 2,356934}
{X: 2,357056 Y: 2,357056}

But it should something like

{X:2,121307 Y:2,121307}
{X:2,121307 Y:2,121307}
{X:2,121307 Y:2,121307}
{X:2,121307 Y:2,121307}
{X:2,121307 Y:2,121307}

because its every frame the same movement vector. That cause the very ugly flickering. How I can fix that?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 6821

Trending Articles