Newbie Question: Rolling friction

Hi all,

Still in my first few days working with GameSalad and I have a probably simple question:

I have a scene that has a flat, horizontal ground with physics enabled (non-movable, but has friction, density, a little bounciness) and a ball actor which also has physics enabled, has gravity applied (via downward acceleration on the actor), is movable and can collide with the ground. I can launch the ball at a set speed and angle above the ground, but I noticed when the ball strikes the ground and starts rolling, it rolls at a constant velocity and never slows down.

I even made a game attribute to keep track of the speed and display it on screen. And yes, the value starts high when the ball is launched, changes due to gravity, but once it starts rolling, it stops changing and becomes constant.

Can anyone point out what I am doing wrong? If both actors can collide and have friction, shouldn't there be a rolling resistance that slows the ball down?

Thanks a lot for any suggestions!

Comments

  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    What rule are you using for the ball's movement?
  • AirshipScientistAirshipScientist Member Posts: 21
    When I spawn the ball, I tell it to Change Velocity, relative to the actor (which starts at a specified angle) and at a given speed. Other than that, I have an acceleration on the ball at 270° relative to the scene to serve as gravity, and a collide with ground. That's all!
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    The thing that is causing the ball to keep moving is your change velocity rule. You should set a timer on it, or have it only apply when not colliding with your solid actor.
    I used to have the same problem. XD am I making sense at all?
  • AirshipScientistAirshipScientist Member Posts: 21
    That does make sense, but when I put the change velocity rule on a 1 second timer, it doesn't seem to fix the problem. It still rolls at a constant speed when it hits the ground. I wonder if I'm doing something else wrong?
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    How quickly do you want it to slow down? You can set a rule to interpolate its speed to 0 when it collides with the solid.
  • AirshipScientistAirshipScientist Member Posts: 21
    Nothing too crazy. Like a golf ball rolling on grass. It should slow down after 2-3 seconds or something like that.
  • AirshipScientistAirshipScientist Member Posts: 21
    Oh, interesting. I just discovered that if I set angular drag > 0 on the ball and have friction on the ball and ground, that seems to slow it down. Is that the typical thing to do?
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    I had to do this wih a grenade physics problem. When it collides, Set a timer. Say after 2.5 seconds, interpolate attribute self.velocity x to 0. Make sure "run to completion" is on
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    I had to do this wih a grenade physics problem. When it collides, Set a timer. Say after 2.5 seconds, interpolate attribute self.velocity x to 0. Make sure "run to completion" is on
  • AirshipScientistAirshipScientist Member Posts: 21
    Oh, that makes sense too. I'll give that a try as well. Thanks!
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    Yes it is actually. I forgot about that. Is it working for you?
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    Yes it is actually. I forgot about that. Is it working for you?
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    Yes it is actually. I forgot about that. Is it working for you?
  • Cutscene EntertainmentCutscene Entertainment Member, PRO Posts: 138
    No problem
Sign In or Register to comment.