Moving while not affected by gravity

MattVolletMattVollet Member Posts: 86
edited November -1 in Working with GS (Mac)
I have a collectable actor that I want to be rotating but the only way I understand to get it to not be affected by gravity is to make it non-movable (which makes it not able to rotate, obviously). How else can I tackle this issue?

Comments

  • firemaplegamesfiremaplegames Member Posts: 3,211
    Yeah, I would love for there to be an attribute of an Actor that is "not affected by gravity".
    In the meantime, you need to apply a constant acceleration to that object in the up direction.

    Also, something to think about, if there is only one actor in your game that is affected by gravity - like the ball in a pinball game - you might want to consider turning gravity off and only applying a constant acceleration in the down direction for that actor.
  • MattVolletMattVollet Member Posts: 86
    Oh wow that is a great idea. Thanks a ton, that saves me a lot of time turning every single object to "non-moveable".

    Also, thank you also for publishing all those demos and tutorials. I just started GS about a week ago and am working on a lofty-platform project that would be 1000Xs more difficult without the reference to a lot of your work.

    Thanks again,

    Matt
  • rebumprebump Member Posts: 1,058
    I think the animated actor such as tshirtbooth suggests is the way to go but here is another possibility:

    I haven't tried this but what if you create an invisible actor (say "CollectibleAnchor") making it non-moveable and place it where you want collectibles. Then have the actual viewable collectible actor placed where they are and constrain each to the underlying invisible actor. This would increase the actor count quite a bit as each is unique.
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    How many actors need to fall? You could set scene gravity to zero and put an accel behavior in the actors that fall. Obviously, if you have a ton of falling actors this might be a pain.
  • MattVolletMattVollet Member Posts: 86
    I tackled my issue with FireMapleGame's approach. I am working on a platform game so only the lead actor needed gravity applied.

    The animation would work as well, but taking gravity off was probably the laziest solution, so I took that (3 cheers for lazy.)

    Thanks for everyones help!
Sign In or Register to comment.