Bounce in opposite direction with collision

PhanielPhaniel Member Posts: 34
edited November -1 in Working with GS (Mac)
How do I make an actor move in the opposite direction with the collision? I don't want to use the restitution option. How do i do it? I want it to bounce of with only the enemy not anything else.

I need to know as soon as possible!

Thanks!

Comments

  • RedlerTechRedlerTech Member Posts: 1,583
    Use the collide behavior & put some restitution on the other actor.
  • PhanielPhaniel Member Posts: 34
    Here is how i want it. I have a main player. There is also an enemy. If the main player touches the enemy, it will bounce in the opposite direction with the collision. If the main player touches the ground, nothing happens. The main player only bounces off the enemy.
  • RedlerTechRedlerTech Member Posts: 1,583
    right, so then make the ground have 0 restitution & you should be fine.

    Matt
  • PhanielPhaniel Member Posts: 34
    I did, but it still didn't work. I also put gravity(down) in the game. Is that why it doesn't work?
  • RedlerTechRedlerTech Member Posts: 1,583
    nope, gravity shouldn't have an effect. In fact, gravity should fix your problem (a little) by creating less of a bounce.
  • micksolomicksolo Member Posts: 264
    joust use a collide rule

    when player overlap / collide with actor
    Collide

    But have no rule for colliding with the ground.

    You can also try changing the restitution of the ground to 0.
  • RedlerTechRedlerTech Member Posts: 1,583
    you need to collide with the ground, if not it won't be a ground?
  • PhanielPhaniel Member Posts: 34
    I changed the restitution of the main player to 1 and the restitution of the ground to 0. It still didn't work. Am I doing something wrong?

    Is there a way that the main player can sense which side it is on the enemy?
  • micksolomicksolo Member Posts: 264
    check out t-shirt booths video tutorial "one way walls".
  • PhanielPhaniel Member Posts: 34
    Sorry, but I can't seem to find the tutorial on "one way walls." Could you please give me the link?

    Thanks so much!
  • PhanielPhaniel Member Posts: 34
    Nevermind, I found it! Thanks so much! :)
Sign In or Register to comment.