Help - Actors sliding along walls & Actors behind each other Issues

singhmrpsinghmrp Member Posts: 6
edited April 2012 in Working with GS (Mac)
Hi all,

I'm new to GameSalad however am experiencing 2 issues, I've spent the last few days trying to resolve however had no luck - hope someone here can help.

Issue 1 - I have 4 walls along the edge of the screen. There are 3 actors which randomly move around the screen and collide/bounce off the walls. The issue I'm experiencing is once the actors touch the wall, they somehow 'attach' to it and continue to slide along there. What I want is for them to simply bounce off and continue.

Issue 2 - The actors mentioned above should be destroyed on being pressed. However if there are 2 actors behind each other, on tapping one, the one behind also gets destroyed. How do i avoid this?

Look forward to your replies.

Thanks.

Best Answers

  • tatiangtatiang Posts: 11,949
    Accepted Answer
    Use Change Velocity or Change Attribute self.motion.linear velocity.x/y to [random values] instead of Move or Move To.

    In the wall actor's attributes, change the Physics-->Restitution value to something high enough to create a bounce (1 or more).
  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    issue#2 … have the actors collide with each other … so they are never in an overlapping state???

    image MH
  • MotherHooseMotherHoose Posts: 2,456
    Accepted Answer
    sorry missed your post yesterday … @singhmrp

    if your actors are in your scene:

    demo: http://www.mediafire.com/?gel8198f27fbk7f

    image MH

Answers

  • singhmrpsinghmrp Member Posts: 6
    edited April 2012
    Hey - great that was it. Note I also had to change X.Velocity and Y.Velocity to minus values when it collided with the wall to prevent it sliding.

    Any ideas on issue number 2?
  • singhmrpsinghmrp Member Posts: 6
    Hi,

    Yes that to prevent overlapping does solve the issue however I would like the actors to go behind each other.

  • singhmrpsinghmrp Member Posts: 6
    Thanks - I see it now.
Sign In or Register to comment.