Help with collide!!!! please!!

Martin14Martin14 Member Posts: 109
edited November -1 in Working with GS (Mac)
Movements are good, but when my player collides with the walls going what they show in the video.

Comments

  • beefy_clyrobeefy_clyro Member Posts: 5,394
    It would help if you show your rules.

    Try using a collide behaviour in both actors and set the restituion on both actors to 0
  • Martin14Martin14 Member Posts: 109
    My rules in the actor are

    when.. actor recive event.. key.. up.. is down

    change Attribute.. self.Position.Y.. to.. self.Position.Y+35

    when.. actor recive event.. key.. down.. is down

    change Attribute.. self.Position.Y.. to.. self.Position.Y-35

    when.. actor recive event.. key.. rigth.. is down

    change Attribute.. self.Position.X.. to.. self.Position.X+35

    when.. actor recive event.. key.. left.. is down

    change Attribute.. self.Position.X.. to.. self.Position.X-35

    collide with.. actor of type: wall
  • simo103simo103 Member, PRO Posts: 1,331
    could you create a rule in that actor that 'when actor overlaps or collides with actor wall' ... drop the collide in there and drop the rest in the otherwise part.

    Not sure but you might not need the collide at all and maybe able to leave that part blank and just use teh otherwise.

    Fairly new to GS so this might not be right or the best/easiest way so hopefully a seasoned pro will weigh-in also
  • simo103simo103 Member, PRO Posts: 1,331
    sorry ... rethought this a bit ... may not work as you need to move a bit to get the collide with the wall. I think Darren was working on issues like this for a pac-man like template and he said it was quite tricky.
  • Martin14Martin14 Member Posts: 109
    Thanks simon103.. I tried it, like you me you said, but neither goes
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    Im guessing its cause your using change position instead of move or accelerate
  • beefy_clyrobeefy_clyro Member Posts: 5,394
    JohnPapiomitis said:
    Im guessing its cause your using change position instead of move or accelerate

    +1
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    I just did a quick test and thats your problem. Your telling it to change the position so it changes to ontop of it and over rides the collide. THen it starts to kick in and gets jittery. Just have move rules with the directions you need and collide and zero restitution and youll be god.
  • Martin14Martin14 Member Posts: 109
    Thanks JohnPapiomitis !!! so... there is possible to make that move like grind with move or acelerate attributs ??

    sorry for English !
Sign In or Register to comment.