GameSalad

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 Member Posts: 12
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?

Comments

  • tiagojdferreiratiagojdferreira Member Posts: 12
    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 Member Posts: 50
    you need to constrain the actors x,y position.
  • gyroscopegyroscope I am here.Member, Sous Chef, PRO Posts: 6,577
    Try making the enemy actors with a density of 10000.

    ""You are in a maze of twisty passages, all alike." - Zork        temp domain http://spidergriffin.wix.com/alphaghostapps

  • tiagojdferreiratiagojdferreira Member Posts: 12
    I meant push not pull, sorry.
  • cbtcbt Member Posts: 644
    You can uncheck the "Movable" box on the enemies. That will do it.
  • tiagojdferreiratiagojdferreira Member Posts: 12
    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 Member Posts: 12
    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.