Counteract Gravity

DookiDooki Member Posts: 247
edited November -1 in Working with GS (Mac)
Hey folks, yet another question for you gurus out there.

OK. I have gravity set to 120. To counter act this I set my actor with a velocity of 120. This should keep it still. This is what is done with the cannon template. In my case I have the cannon mounted on the side wall and I want it to remain in position.
- My actor keeps slipping down even though gravity and velocity are same. Why? Solution?

Thanks again!
Dooki

Comments

  • DookiDooki Member Posts: 247
    ...oops sorry. I meant to say accelerate and not velocity.

    So, gravity and accelerate are the same value, 120.

    -Dooki
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Better yet, don't use gravity. Put an accelerate behavior at an angle of 270 in all falling actors. Way easier than try to counteract gravity.
  • KamazarKamazar Member Posts: 287
    What scitunes said. Always a better strategy, since move/accelerate are always fishy against gravity (and I tried tons of combination with timers, constrain and change attributes, etc). When you're using accelerate, though, make sure to cap the speed. Gravity's constant, while accelerating means it's constantly speeding up.
  • DookiDooki Member Posts: 247
    Thanks guys.
    Well I reset gravity and applied "accelerate" at 270*. I played with the acceleration value. In the end I got a ball that gently fell but then wobbled in the air in a crazy fashion. The bounce physics were better with gravity on.
    Thoughts?

    -Dooki
  • DookiDooki Member Posts: 247
    Hey guys,

    I still have my side mounted cannon slipping down. I need some help. Here is what I have for it's position:

    -Accelerate= 100 (to counteract the scene gravity of 100) relative to "Scene."
    - Change Attribute= self.StartY To:self.Position.Y
    - Change Attribute= self.Position.Y To:self.StartY

    That's it. Am I missing something? Do I need to adjust something? T

    Thanks,

    -Dooki
  • firemaplegamesfiremaplegames Member Posts: 3,211
    The second Change Attribute you have above needs to be a Constrain Attribute.
    And once that is in place, you don't need the accelerate anymore.

    So:

    Change Attribute: self.StartY To: self.Position.Y
    Constrain Attribute: self.Position.Y To:self.StartY

    And kill the upwards Acceleration, you don't need it.
Sign In or Register to comment.