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

Author Topic: Rotating/Snapping  (Read 2552 times)

0 Members and 1 Guest are viewing this topic.

Bernd

  • Newbie
  • *
  • Posts: 11
    • View Profile
Rotating/Snapping
« on: May 31, 2010, 10:37:59 pm »
Hi,
I'm working on a map editor.
I have tiles of 128x128 to place in a grid.
I'm calculating the positions for the tiles from the mouseposition, so while dragging a tile, it snaps to the grid.

I've done it like this: int tile_x = mouse_x/GRID*GRID. (kind of normalizing it to the grid)

Now when I rotate the tiles I get gaps between some of them, is that because of the position? What would be a smarter way to do it?




Edit: Just tested on an other computer, and I dont have any gaps here. Doesn't make sense to me :-(

Mindiell

  • Hero Member
  • *****
  • Posts: 1261
    • ICQ Messenger - 41484135
    • View Profile
Rotating/Snapping
« Reply #1 on: June 01, 2010, 12:44:15 pm »
Maybe ATI drivers ?

Apart of this :
- SFML Version ?
- OS ?
- IDE ?

Thx
Mindiell
----

Bernd

  • Newbie
  • *
  • Posts: 11
    • View Profile
Rotating/Snapping
« Reply #2 on: June 01, 2010, 01:49:40 pm »
Laptop: some Intel-drivers, PC: NVidia
WinXP on both.

Build on PC with MS VS 2008 Professional, Standard on Laptop.

Will try the laptop-binaries on the pc later today.

Bernd

  • Newbie
  • *
  • Posts: 11
    • View Profile
Rotating/Snapping
« Reply #3 on: June 06, 2010, 08:38:15 am »
Still got the problem, it's SFML1.6 btw.