Gravity and acceleration advice...

delorianhayzedelorianhayze Member Posts: 55
edited November -1 in Working with GS (Mac)
I know, I know, this subject has been posted a zillion times over. But every time I search for my problem, I never quite get a decent solution. My game is physics based. Meaning, it relies heavily on objects falling and bouncing off one another in a more realistic type manner. I've found that using gravity (set to around 1500 on Y) adds the realism I'm looking for. Problem is, when the character shoots their weapon, the bullet just hits the floor (because the gravity is too great). I've tried speeding up the bullet but it comes across clunky.
So then I read about using Acceleration (speed 500 direction 270 relative to scene) and that works to a certain degree. Problem is, the objects just don't have the same realism as when gravity is turned on. Am I missing something?
When objects are hit, some go to the ground as they should, but the rest just kind of dance and hurdle in space. I've read something about changing velocity, etc. but I'm confused on how to do that, and why?
Point is, I'm looking for realistic type physics for my game, the same way gravity would. How can I achieve this using acceleration?
I certainly see the benefits to it, I just can't seem to get it to work.
Many many thanks over for any help you can give!
DH

Comments

  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    just up the acceleration in whatever objects are not having correct gravity. All the built in gravity is is a accelerate dwon behavior thats applied to everything, so youll be able to get the same results by playing with the acceleration behavior you put in each actor
  • delorianhayzedelorianhayze Member Posts: 55
    Thank you! So I did what you said and for the most part it worked. But yet, every so often, an object would still kind of dance and hover. Most of the objects would fall properly, but some of the same objects wouldn't. To work around this I created an attribute called "GRAVITY ON". And I said, IF the main character hits the block, turn GRAVITY ON to 1. As long as it's 1, continue to accelerate downwards (270 to scene). This seemed to work. But it seems a bit gratuitous no? I must be doing something wrong here. I'm new if you haven't noticed. Is this a good work around? And while I'm here, is there a way to say IF PLAYER DOES X, then when he hits an object he can bounce X faster in direction X?
    btw, when I say X, I just mean INSERT WHATEVER HERE.
    As always many many thanks! Much appreciated!
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Anytime glad i could help. Also you can go into each objects phyics attributes and play with the density.

    And for your second question sure thing, you just need to set up rules and you could change the actor linear volucity to bounce it.

    So say you had a actor and you want bounce up when he touches another actor . You would have a rule when player collides with bounce actor, change attribute self motion linear velocity y (y is up and down and x is left and right) to 400.
Sign In or Register to comment.