Possible bug

BravarianPawStudiosBravarianPawStudios PRO Posts: 12
edited July 2012 in Working with GS (Mac)
If this question has been answer, please tell me the post. Anyway

So I'm working with this game where you have to deal with gravity (I use the acceleration behaviour) and I track the linear velocity y. So every time there's a overlapping the velocity y goes to 0 which I find right. Since I need the velocity before the collision happens a simple overlapping condition is not good for me (maybe the process of what I think is happening it's actually not happening). So I created a timer to track the velocity but it goes to zero anyway. Then I tried my own timer and the velocity goes to zero (linear velocity y attribute). Finally I decided to track my own velocity y with my own timer code but even that the velocity goes to zero when there's overlapping but after that, it goes to the last value before overlapping.
Does any know why?! Am I doing everything wrong?!? It's The Matrix playing tricks with me?

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    While it's not entirely efficient, you could constrain a "lead" actor below your falling actor (assuming it's falling down) and have a collision rule that changes some game attribute (e.g. game.CollisionSpeed) to the velocity of the lead actor when it collides with whatever actor you are using to stop it (e.g a floor).

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.