Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualapatriarca

Posted 05 May 2013 - 06:07 AM

If you don't care about showing part of the ship on the other side, you can simply test the ship position with each edge and then teleport both the new position and the old one to the other side of the screen. In this way the ship seem to enter from the edge. Alternatively you can implement the wraparound logic after the interpolation step, i.e. storing an "absolute" ship position and then computing the modulus when computing the ship position on the screen. 


#1apatriarca

Posted 05 May 2013 - 06:06 AM

You don't care about showing part of the ship on the other side, you can simply test the ship position with each edge and then teleport both the new position and the old one to the other side of the screen. In this way the ship seem to enter from the edge. Alternatively you can implement the wraparound logic after the interpolation step, i.e. storing an "absolute" ship position and then computing the modulus when computing the ship position on the screen. 


PARTNERS