Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualParadigm Shifter

Posted 03 May 2013 - 05:21 AM

You need to set the position to the new location without changing the velocity. Dunno if that would cause problems with the physics though, since the object basically "teleports" to a new position...

 

If you want to see an object which straddles the edges when it wraps around the screen (like the ship in asteroids) you can do that by having 4 objects placed at the corners of the screen distance apart that move in tandem (that way you get to see half of the ship on each side of the screen while it is moving off the edges). Objects which are more than one screen size distance away from the edge of the screen need to be repositioned so they are less than one screen distance away though, using the same method as above.


#1Paradigm Shifter

Posted 03 May 2013 - 05:18 AM

You need to set the position to the new location without changing the velocity. Dunno if that would cause problems with the physics though, since the object basically "teleports" to a new position...

 

If you want to see an object which straddles the edges when it wraps around the screen (like the ship in asteroids) you can do that by having 4 objects placed at the corners of a screen that move in tandem (that way you get to see half of the ship on each side of the screen while it is moving off the edges). Objects which are more than one screen size distance away from the edge of the screen need to be repositioned so they are less than one screen distance away though, using the same method as above.


PARTNERS