2D reflection on water
Posted: Sat Apr 01, 2017 12:46 am
I'm trying to make a 2D reflection on water in my kind of luftrausers clone
My main problem is currently that the reflection comes off the water, as shown in this image
Here's my code for the reflection:
I'm not sure how to make it so the reflection doesn't clip. I tried using love.graphics.setScissor() but it seems to affect all of the graphic objects.
Does anyone know how I can do this?
My main problem is currently that the reflection comes off the water, as shown in this image
Here's my code for the reflection:
Code: Select all
playerClone.Position=Vector2.new(player.entity.Position.x, (2*water.Position.y-player.entity.Position.y)-50) --50 being the size of the image
playerClone.Rotation=-player.entity.Rotation
Does anyone know how I can do this?