Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - LiChE

Pages: [1]
1
Graphics / Re: Converting from world to screen coordinates
« on: September 20, 2012, 08:53:15 pm »
Damn, I was trying to avoid having to do that, but I guess there is no other choice.

Maybe I can get it to work with sf::RenderWindow::convertCoords()...from my understanding, it converts mouse coordinates to world coordinates by passing in your world view...so if I pass in a view with a view made from the inverse of the world view, it should convert world coordinates to screen coordinates...

maybe.

e: that convertCoords() idea I had definitely didn't work.

2
Graphics / Converting from world to screen coordinates
« on: September 20, 2012, 01:15:04 am »
I am using a view to zoom + translate a tile map and it works fine. The problem is, I have light position's in world coordinates and am using a light attenuation shader to draw the light - I need to convert the light's position in world coordinates to screen coordinates. I have tried using view.getInverseTransform().transformPoint but it gives odd results.

Pages: [1]
anything