Anti - Gravity Trigger

triskit124triskit124 Member Posts: 11
edited November -1 in Working with GS (Mac)
Hey everyone, I am currently working on an app called Skillshot. The premise of the game it to shoot a ball by "slingshoting" it an having it hit all the targets in as few throws as possible. What I am wondering is if there would be a way to make it so when the ball collides with an actor, to have the ball gravitate or fall upwards, as if gravity has been turned off. P.S I am not using the gravity attribute, I am altering the Ball's linear velocity.

Thanks!

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    this is how i would do it:

    Make a boolean attibute called invertGravity and have it set to false.

    Now instead of using linear velocity for you gravity have this.

    A rule when attirbute invertGravity is false
    -accelerate down relative to scene

    then open up the otherwise section of that rule and have a accelerate behavior in there as well except have it up relative to scene

    then whenever you want to change gravity have a change attribute behavior and change attribute invertGravity to true

    then when you want to change it back change attribute invertGravity to false
  • triskit124triskit124 Member Posts: 11
    Thanks so much that helped completley!
Sign In or Register to comment.