Page 1 of 1
Viewing
Posted:
Wed Aug 01, 2007 5:44 am
by arcreamer
hey guys im a little stuck here... see, im making a game and i want to have it so when im going my view is following me but i dont want to have to make the view parent my player... i also want so that when i move really far to the right/left i dont want the view to show the screen color of GE... isnt their like a region or something do to that? can someone help me out here?
Posted:
Wed Aug 01, 2007 6:16 am
by d-soldier
Heres a demo of a smooth moving view rig. Keep in mind, I'm not the genius who thought this up... I thought there was a demo already, but couldn't find it. Keep in mind, this works through various objects draw actors scripts, NO parenting involved.
Posted:
Wed Aug 01, 2007 6:53 am
by DocRabbit
Basically, you just put the wire frame region on edges of your view and make the view their parent(so they move with the view). The just do a collision check, non repeating, and move the view in reference to the view a variable distance. A good starting zone for the distance is the distance between opposing regions, (left trigger, right trigger). The subtract 2*width of your player. What you are trying to do is avoid the ping-pong effect. If you get it the first time, you'll quickly see why it is called the ping-pong effect. That is the very basic method not parenting the player to the view. You could disable the player moving while the view is in its moving stage by just running your move the player routine against view's velocity being anything but 0.(zero) depending on how close in these zones are to the center of the screen, you can have the screen stay fairly centered or the other extreme would be the Zelda scroll.
Posted:
Wed Aug 01, 2007 7:53 pm
by arcreamer
thank ya. ill try that