Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Density 0 doesn't seem to work =/

tiagojdferreiratiagojdferreira Posts: 12Member
edited November -1 in Working with GS (Mac)
Hey guys,

I just made my player actor with density 0 and my enemy actors with density 0, still, when my player collides with the enemies it pulls them.
How can I fix that?


  • tiagojdferreiratiagojdferreira Posts: 12Member
    I want my player to collide with the enemies, but I don't want them to move when they collide. I putted:
    Density 0 and Restitution 0
    When my player collides against an enemy, if I tell him to keep moving forward he pulls the enemies in from of him (instead of being still).
    I want the enemies to be able to block the progress of my character.
  • robzrobz Posts: 50Member
    you need to constrain the actors x,y position.
  • gyroscopegyroscope I am here.Posts: 6,577Member, Sous Chef, PRO
    Try making the enemy actors with a density of 10000.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain

  • tiagojdferreiratiagojdferreira Posts: 12Member
    I meant push not pull, sorry.
  • cbtcbt Posts: 644Member
    You can uncheck the "Movable" box on the enemies. That will do it.
  • tiagojdferreiratiagojdferreira Posts: 12Member
    cbt said:
    You can uncheck the "Movable" box on the enemies. That will do it.

    If I uncheck the movable will I still be able to make rules for them to chase the player?
  • tiagojdferreiratiagojdferreira Posts: 12Member
    tshirtbooth said:
    make the density 1000

    If I make the enemy density 1000 and the player density 0 I can't push the enemy but the enemy can push me.
    If I make the enemy density 0 and the player density 1000 I can push the enemy but the enemy can't push me.
    What I want is a way that neither me, nor the enemy can push each other. (isn't that what density 0 is supposed to do?)
    Remember that the player moves, but the enemy also moves.
    When I have the time, I'll try making a boolean attack that changes to true when the enemy is close to the player, making the enemy stopping and attacking and that changes to false once the player is far from the enemy, making him chase the player and not attack. If I put the enemies with density 1000 this ought to solve the problem.
    Isn't there a simpler solution?
This discussion has been closed.