Density of Zero but my actor still falls, why?

RacetotheMoonRacetotheMoon Member Posts: 323
edited November -1 in Working with GS (Mac)
I'm really keen on using gravity for my scene since I want to have some falling objects, and also have them react properly with physics when hitting ground. I also want to have a 'stamp' come down upon the push of a button.

The way I was planning on working it was to have the button tell the 'stamp' to move to location (x, y) when the button is pressed, then move back to the previous (x, y) location when let go. To do this, since I planned on using gravity for the boxes, I figured I'd keep the 'stamp' with a zero density so that it wouldn't move unless I requested it to.

However, that's not what's happening.

Even with a density of zero my object falls upon starting the scene.. and at the same rate as objects that do have density. I tried to click the Movable flag off, which keeps my 'stamp' at its starting location, but of course then I can't move the object upon my push of the button.

I haven't worked with GS in a little while, so maybe I'm guessing I'm just overlooking something. Any help would be much appreciated.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    density has nothing to do with Gravity in GS. I would highly recommend avoiding gravity and just put a 270 acceleration in any actor you want to fall. That way, you simply leave the 270 acceleration out of your stamp actor. You can even create a game attribute (integer) called gravity. In the 270 acceleration put game.gravity as the speed and in the main attribute list set this attribute to whatever you want. Then if you decide later to change how fast things fall you can change all falling actors drop rate just by changing the value of the one game.gravity attribute you created.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Hmmm I havnt made any physics / gravity based games yet.... but couldn't you just give it an upward acceleration equal to gravity to combat it? Not sure, but at least in physics its 9.8 meters/s....

    Sorry about this just wondering...

    Akemi Akio, this is japanese, no?

    If so: Hajimemashite. Watashi Wa Will Desu. Douzo Yoroshiku.

    I took Japanese I last year during school and am thinking about taking Japanese II next year :D

    Good Luck!

    -Will
  • chosenonestudioschosenonestudios Member Posts: 1,714
    scitunes said:
    density has nothing to do with Gravity in GS. I would highly recommend avoiding gravity and just put a 270 acceleration in any actor you want to fall. That way, you simply leave the 270 acceleration out of your stamp actor. You can even create a game attribute (integer) called gravity. In the 270 acceleration put game.gravity as the speed and in the main attribute list set this attribute to whatever you want. Then if you decide later to change how fast things fall you can change all falling actors drop rate just by changing the value of the one game.gravity attribute you created.

    ahhhhh beat me by 13s! almost had you scitunes! haha
  • RacetotheMoonRacetotheMoon Member Posts: 323
    You guys are the best. Thank you!

    I knew I'd get a reply, but I didn't think I'd get one before I was even done eating my dinner. :) I don't know why I thought leaving density at zero would make a object 'float'. Thanks for the suggestions.

    Akio Akemi sounds very Japanese, and I have no doubt there are people with those names from Japan. However, I am not one of them. The name actually comes from a combination of two suicide girls I enjoy and was the by product of me needing an alias a couple years ago. After that the name just sort of stuck.

    I also took Japanese I in college, but it's been a couple years since then and I'm more than a little rusty.
  • chosenonestudioschosenonestudios Member Posts: 1,714
    Haha well hopefully I helped! Very cool! I've used Akio sometimes as a nickname when playing halo haha...

    Well, good luck!

    Cheers!

    -Will
  • RacetotheMoonRacetotheMoon Member Posts: 323
    Most certainly. You guys were a huge help. This is going to work out just fine. I've already got it up and running. :)
Sign In or Register to comment.