The Trouble with Collision

SpeedygamerSpeedygamer Member Posts: 3
edited July 2012 in Working with GS (PC)
On my character, I just one simple rule.
Rule -> If overlaps or collides with actor with tag
DO: Constrain Attribute (self.motion.linearVelocity.y) 0
ELSE: Accelerate 270, at spd of 100.
Both the ground and my character have 100 friction and density.
The character does stop, but he overlaps some of the ground instead of just when he collides. I can't seem to fix it, and I'm not sure if it is because I am beta-testing on windows.
Thanks for your help.

Best Answer

  • tenrdrmertenrdrmer Posts: 9,934
    Accepted Answer
    You need to add a collide rule so it knows not to pass through the actor. Right now its doing exactly what you told it to do. It comes to a stop when it overlaps the ground. Unfortunately it takes a fraction of a second for it to change it speed sop its overlapping.

    Just place the Collide behavior outside of a rule in the logic stack and tell it what collide with. Also you wont need to tell it to change velocity with a collide rule. It stop on its own. You do need to adjust your bounciness attribute down closer to 0 or you will probably have a big bounce on the first collision

Answers

  • SpeedygamerSpeedygamer Member Posts: 3
    Oh--My--God... I have tried everything to stop it from overlapping the ground. Tenrdrmer, I salute you and your awesomeness.
Sign In or Register to comment.