Bouncing doesn't work correctly...

riseagainst378riseagainst378 Member Posts: 9
edited November -1 in Working with GS (Mac)
at the moment, i'm making a simple top-down game where different orbs will bounce off solid, rectangular walls indefinitely. however, if the ball impacts the wall at a low enough angle, "bounce" no longer works -- instead, the orb "sticks" to the wall, and runs horizontally or vertically alongside it. i'm wondering if this is a problem with me or with the engine itself...does anyone else have this problem?

thanks in advance.

Comments

  • DookiDooki Member Posts: 247
    Have you played with the "Restitution" value under the Physics tab in the actors attribute pane? Play with that value (.01, .08, etc) and test.
  • riseagainst378riseagainst378 Member Posts: 9
    which actor's restitution should i be adjusting? i've tried 0, 1, 2, and multiple things in between for the orbs...changing the wall doesnt seem to be doing anything
  • StusAppsStusApps Member, PRO Posts: 1,352
    also check the friction settings.
  • riseagainst378riseagainst378 Member Posts: 9
    restitution for the orbs is 2...restitution for the wall is 0.
    friction for both of them is zero. i'm sure there's something blindingly obvious that i'm doing wrong here, but i can't seem to figure it out...

    thanks for all the help so far.
  • riseagainst378riseagainst378 Member Posts: 9
    does anyone have any other ideas as to what this problem could be? or maybe a link to a tutorial about movement? i can't seem to find too much on the subject...
  • TyvanTyvan Member Posts: 29
    Try these settings

    Orbs: Density 1
    Friction 3
    Restitution 0.1

    Wall: Density 1
    Friction 300
    Restitution 0.3
  • riseagainst378riseagainst378 Member Posts: 9
    just tried those settings. the only difference now is that the orbs stick to the wall and slow down in speed.

    maybe i did something wrong with the objects themselves?

    Walls
    Density: 1
    Friction: 300
    Restitution: 0.3
    Fixed Rotation: False
    Movable: False
    Collision Shape: Rectangle
    Drag: 0
    Angular Drag: 0

    Orbs
    Density: 1
    Friction: 3
    Restitution: 0.1
    Fixed Rotation: True
    Movable: True
    Collision Shape: Circle
    Drag: 0
    Angular Drag: 0

    before this, i had the orbs' friction set to 0 (as they are always supposed to move at a continuous speed), and restitution set to 2.
  • TyvanTyvan Member Posts: 29
    Make sure you have the orbs collide set to scene and not actor.

    When I get home I will take a look at it.
  • riseagainst378riseagainst378 Member Posts: 9
    i'm sorry, i'm a little new to this...how do you set the collision to scene instead? my collision event doesn't have an option for that, and i can't seem to find a place to give the scene itself any behaviors, if that was what you meant.

    and thank you for your time, i really appreciate it. i tend to overthink things when they don't involve code...
  • TyvanTyvan Member Posts: 29
    So go into the scene, then click the actor Orb's is on. Then in your collide rule there will be a slider to pick either collide with scene or actor.
  • riseagainst378riseagainst378 Member Posts: 9
    is this slider supposed to be inside the original actor? i can't seem to find a slider anywhere. the only thing available for my collide rule is to "bounce when colliding with tag Obstacle", which is what all my walls are under.
  • riseagainst378riseagainst378 Member Posts: 9
    bumping this up again...
  • riseagainst378riseagainst378 Member Posts: 9
    any other ideas? i hate to continually bump the thread but i can't seem to figure this out. about to scrap the GS movement and write something myself...seems like something silly must be missing, though, to make this happen.
  • firemaplegamesfiremaplegames Member Posts: 3,211
    I have a magnitude demo in the games section of my wall. It might be able to help you. The balls move at a steady velocity.
Sign In or Register to comment.