Gravity issue

agangulyaganguly Member Posts: 22
edited November -1 in Working with GS (Mac)
I have gravity in the scene to Y = 120. There are some objects which are held on to the scene ( not allowed to fall off when the scene launches) by the accelarate function and the self.Position.Y. However, I want some of them ( those hanging objects) to fall verically down when something hits them. This is not really happening and instead when something hits them it flies off horizontally in the direction of the hit.

Also, the actor hitting those hanging objects are spawned on the fly ( hence falls down vertically after hitting) but the actor makes a sporadic spin, falls off to the ground and still keeps on spinning forever.. I do not have any rotate function though.

Would appreciate if someone can help me to get around this issue.

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    I would never use the scene gravity personally but use accelerate on the actors instead because you will need to use a lot of constrains or reverse gravity on actors you don't want to be effected by the scene gravity.

    If you want an actor to only be effected by gravity when hit make a self attribute lets say "hit"

    Actor overlaps or collides (with the actor that triggers the fall), change attribute self.hit=true

    Rule: if self.hit=true accelerate

    Hope this helps.

    Darren.
  • agangulyaganguly Member Posts: 22
    Thanks Daren for your response. Agree to your recommendation of not using gravity. I have instead provided an acceleration in the opposite direction to simulate the gravity thingy..

    However, regarding the 2nd part to my issue that i mentioned earlier still remains, that is, the objects after hitting the bottom is rotating on its axis. Do I need to do anything just to make sure those remains grounded without rotations.

    - Archan
  • firemaplegamesfiremaplegames Member Posts: 3,211
    In the misbehaving actor, make sure "Fixed Rotation" is checked under Physics. That will keep it upright.
  • UtopianGamesUtopianGames Member Posts: 5,692
    And if it's bouncing too much when it hits the floor change the restitution for the actor along with the ground actor.

    Darren.
Sign In or Register to comment.