Page 1 of 1

Speed synchronization problem

Posted: Mon Jun 03, 2013 8:14 pm
by AaronAumer
Hey guys! I use love2d for few days and this is awesome tool for gamedev :)
I have some problem with synchronization between game hero and light from this thread. I need it for a horror game
I attach test scene, you can see all troubles by yourself.
It had a dirty code, never mind, I just want to fix this.
Thanks for any help :)

Re: Speed synchronization problem

Posted: Tue Jun 04, 2013 6:46 pm
by unek
you have to pass the player's position on the screen to the shader.
this should fix it:

Code: Select all

effect:send("pos",{player.getX() + 35 - camera._x, player.getY() - 20 - camera._y})

Re: Speed synchronization problem

Posted: Wed Jun 05, 2013 12:26 pm
by AaronAumer
it fix some parts
but when I'm going up light on this time going down :<