Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

131 Neutral

About Boov

  • Rank
  1. Boov

    Getting an object to roll/slide

    Thanks h4tt3n, I'm presume there's no real benefit to one method or another as long as they're implemented well. Physics engines are so fun to build
  2. Boov

    Getting an object to roll/slide

    That's great h4tt3n, I've had a look through the code, one question I have is what defines a "force based" physics engine? Are there alternatives to "force based", and which part of the simulation is force based, is it the ball-ball collision response? Cheers.
  3. Boov

    Getting an object to roll/slide

    Many thanks for your reply, I now understand why the ball was stopping. I've fixed my reflection based on your code snippet, bouncing now works correctly, and in turn it has fixed the problem of rolling/sliding! Cheers!
  4. Boov

    Getting an object to roll/slide

    Thanks for the reply. This is basically what I'm doing for a collision (simplified)... if (distance <= 0) { vector reflection = reflectionVector(); reflection.x = reflection.x * 0.5; reflection.y = reflection.y * 0.5; } I do this for every collision. Is this wrong? If so, how do I work out which component to dampen more? For some reason I presumed the x and y components both decreased proportionally.
  5. Boov

    Getting an object to roll/slide

    The ball stops because of what you described. The velocity keeps getting smaller and smaller after every bounce (never actually reaching zero), but it becomes so small that it stops. I never even thought about "turning bounces off". Thanks for the reply, I'm also going to have a play around in the main loop, maybe I have something in the wrong order.
  6. Hello all of gamedev, I've visited this wonderful site countless times, I've finally signed up because I've hit a problem. I'm writing a basic physics engine in C++ using SDL, this project is mainly for the learning experience as I'm told using an existing physics engine is always a better option for games. At the moment all I've got are collision planes (lines), and several particles. Gravity, collision detection, and the reflection vector all work fine. But here's the problem, each particle currently loses half the energy after a bounce. So you can imagine what happens when you try and slide a particle down a slope, the ball bounces down the slope (instead of sliding down), continues to lose energy, and eventually comes to a halt. I'm not sure how well I've explained myself, so a picture can't hurt. Any suggestions/solutions are much appreciated, thanks.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!