Need help with enemy territory

prasantha60prasantha60 Member Posts: 7
edited November -1 in Working with GS (Mac)
I am creating game which as sea and sky. Sea creature in the sea they accelerate toward the character. My problem is I don’t want this sea creature to go above the sea. What I did was I put 2 boundary actors top and bottom of the sea. Every time this sea creature hit the boundaries set sea creatures motion line X and Y to be 0. This tactic working some time , but sometimes sea creatures going above the boundaries.
Please can anyone help me , how can I fix it

Comments

  • BarkBarkCoBarkBarkCo Member Posts: 1,400
    Rule:
    When `SeaCreature.position.y` >= predefined number based min y position of the sky:
    "set sea creatures motion line X and Y to be 0"
  • prasantha60prasantha60 Member Posts: 7
    barkbark00 said:
    Rule:
    When `SeaCreature.position.y` >= predefined number based min y position of the sky:
    "set sea creatures motion line X and Y to be 0"

    thanks man its working perfectly
Sign In or Register to comment.