Speed synchronization problem

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
AaronAumer
Prole
Posts: 3
Joined: Mon Jun 03, 2013 7:33 pm

Speed synchronization problem

Post 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 :)
Attachments
test.love
(155.93 KiB) Downloaded 97 times
User avatar
unek
Citizen
Posts: 86
Joined: Fri Oct 12, 2012 8:43 pm
Location: Poland
Contact:

Re: Speed synchronization problem

Post 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})
DRAW DRAW - online painting app CLICK NUMBERS - cool game with numbers THEME LOVEFRAMES - a collection of my themes HOST FOR FREE - free hosting for online LOVE games STALK PEOPLE - a map of LOVE users
AaronAumer
Prole
Posts: 3
Joined: Mon Jun 03, 2013 7:33 pm

Re: Speed synchronization problem

Post by AaronAumer »

it fix some parts
but when I'm going up light on this time going down :<
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 2 guests