colliding problem

deej011deej011 Member Posts: 159
edited November -1 in Working with GS (Mac)
hi,
how do i make an actor stop when it collides with another actor when i use the collide attribute and actor bounces off the other actor is set to not moveable

cheers

Comments

  • ValanValan Member, BASIC Posts: 410
    There are several ways to do this.

    The quick and dirty way is to kill the actor on collision and the spawn a no moving graphic version in the same place. This has the advantage that there is very little code and it can be changed easily later for a more sophisticated solution. The disadvantage is that it will put a serious dint into the games speed.

    The more sophisticated solution maybe to halt or reverse the motion vector of the actor at the time of collision.

    Cheers
    Valan
  • POMPOM Member Posts: 2,599
    Have you tried setting both actor's restitution attribute to 0 ?

    Roy.
  • deej011deej011 Member Posts: 159
    thanks heaps roy's solution worked perfect thanks aswel valan for your advice

    cheers
Sign In or Register to comment.