playMaker

Author Topic: World Bounds, resetting player to 0,0,0  (Read 1700 times)

Justin

  • Junior Playmaker
  • **
  • Posts: 58
World Bounds, resetting player to 0,0,0
« on: March 25, 2013, 03:21:30 PM »
In one of the games I am working on I am encountering a problem.  The game is a perpetual rail based game that spawns level segments in a linear direction along the x axis.  The problem I am having is once i get to the edge of unitys world boundary (which is somewhere around when a coordinate reaches 7+ digits) the physics get all screwy and spawn level pieces, enemies, etc. in the wrong places, with the wrong force, and sometimes even upside down. 

So what I need to do is create a trigger that will reset the level piece and the player to (0,0,0) after the player has traveled through say 10 pieces. This reset will also need to be seamless or I will just quickly fade out/in the screen while the transition takes place. 

Now, I have setup the trigger and everything works correctly except for one part.  I'm using the "set position" command to reset both the level piece and the player.  I can get one or the other to reset but not both simultaneously.  When I try to reset both the player goes flying at angle down into the void. I think this is because of collision, the level piece is enclosed and I think that might have something to do with it. I'm guessing I need to find a way to temporarily remove collision from the player or setup a special level piece with no walls where this reset can take place.  If anyone has encountered this problem before or has any ideas, any/all advice would be appreciated. Thanks.

greg

  • Junior Playmaker
  • **
  • Posts: 68
Re: World Bounds, resetting player to 0,0,0
« Reply #1 on: March 25, 2013, 05:18:09 PM »
You could have the level/world move past the player, creating the illusion that the player is moving :)