Question about limits...

goliathgoliath Member Posts: 1,440
edited November -1 in Working with GS (Mac)
Hello everyone. My game Spacescape is undergoing some changes and I need your help! First off the title is going completely tilt control (thank you Scitunes) but I am having an issue when the ship gets close to the edges of the screen.

Right now when the ship gets near any edge of the screen (goes off screen) the ship respawns in the center of the screen. I want it to either a) when it gets near the edge of the screen not go off screen or b) maybe bounce off the edge of the screen so it doesn't fly off screen.

i hope i am making myself clear on this (it's early in the morning and I am not feeling very articulate for some reason).

My idea was to create 4 invisible walls around the perimeter of the screen to keep it confined to the format....

Any ideas would be appreciated..

Comments

  • RHRH Member Posts: 1,079
    goliath said:

    My idea was to create 4 invisible walls around the perimeter of the screen to keep it confined to the format....

    I'd do exactly that, untick movable on them and stick them in a new layer that isn't scrollable.
  • StusAppsStusApps Member, PRO Posts: 1,352
    if you want it to bounce off the walls set them to a high restitution if not then set it to 0
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Restitution will have little effect on your ship because you are using constrains to control it which seems to almost completely override physics. To keep it the most consistent I would set the restitution of the walls to 0 in case the physics do kick in now and again.
Sign In or Register to comment.