Physics problem

ChandlerCChandlerC Member Posts: 6
edited November -1 in Working with GS (Mac)
I have my characters move based on a point and click system.
(Mouse selects character, mouse then selects another point on the map,character moves to that coordinate.)

But I do have a few obstacles in the way, and the problem is if the player selects a coordinate that along the way is blocked by an obstacle, the character hits the obstacle and starts moving to the left or right (very slowly and jittery)

Is there anyway that I can make the character stop when it hits a collision object?

Thanks

Comments

  • tenrdrmertenrdrmer Member, Sous Chef, Senior Sous-Chef Posts: 9,934
    You can setup a game Attribute will say move and in all of your movement rules make game.move being true required and then setup in your character when overlap collide with obstacle Change attribute game.move to false
  • ChandlerCChandlerC Member Posts: 6
    It's still not working. They still just hit the collider and bounce off. I have bounce set to zero on all of them
  • JohnPapiomitisJohnPapiomitis Member Posts: 6,256
    ChandlerC said:
    It's still not working. They still just hit the collider and bounce off. I have bounce set to zero on all of them

    you mean restitution? have restitution set to 0/

    Try having a rule when the actor collides with the obstacle change attribute self motion linear x to 0 and self motion linear y to 0
  • ChandlerCChandlerC Member Posts: 6
    JohnPapiomitis said:
    you mean restitution? have restitution set to 0/

    Try having a rule when the actor collides with the obstacle change attribute self motion linear x to 0 and self motion linear y to 0

    Still starts sliding and jittering on the Y axis (Top down view)
  • UtopianGamesUtopianGames Member Posts: 5,692
    You need to set restitution to 0 in all the objects.

    Try a rule that only allows the player to move until he hits a block.

    If canMove = true move to .... if overlaps or collides with block change attribute canMove to false.

    Darren.
Sign In or Register to comment.