platform actor issue about gravity

digitalzerodigitalzero Member, BASIC Posts: 639
edited September 2012 in Working with GS (Mac)
is there any way to apply gravity to an actor instead of using the accelerate behavior... heres why i ask... I'm creating a adventure game and I'm doing some fine tuning to the game now... heres my problem... when i jump in the air and i press the left and or right button the character really accelerates and kind of lingers until it drops... and i don't like that one bit... or is there a way to keep the accelerate to a constant so i can kind of trick the actor in thinking its an accelerate but its being used as a change velocity.. i hope I'm making sense...

Comments

  • UtopianGamesUtopianGames Member Posts: 5,692
    I use self motion.linear.velocity.x in my platform templates as it works a lot better, wrap it in a timer every 0 seconds and for jump i use the change motion.linear.velocity.y





    Hope this helps.

    Darren.
  • digitalzerodigitalzero Member, BASIC Posts: 639
    @utopiangames i understand that because thats what i have for my actor as well but what I'm talking about is the gravity that pulls the actor down to collide with the ground... what do you use for that because i don't like the fact that the acceleration does not fall at a constant speed as you know using acceleration starts off slow and initially picks up speed which is what i do not want at all... OH BY THE WAY @utopiangames .... THANKS SO MUCH FOR THE SUGGESTION ON THE PRELOAD IMAGES APP... that REALLY helped me out A LOT!
  • grierdillgrierdill Member Posts: 16
    edited September 2012
    One thing I do is to use the acceleration as gravity but put a speed limit on it, so if linear velocity Y is < -150 set linear velocity to -150, that way you can still have a little natural gravity motion, easing up and down at the apex of a jump, but still have it be controllable.
  • digitalzerodigitalzero Member, BASIC Posts: 639
    so i guess I'm kinda confused how i would use that because the problem that I'm having is the fact that when it reaches its maximum height and it comes down it seems like it takes it a minute to come down... its only when i press left and right in the air though
Sign In or Register to comment.