Added: 4 years ago
From: Draknek
Views: 3,684
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (16)

Sign In or Sign Up now to post a comment!
  • Comment removed

  • how much calculus did you know when you made this?

    Im Doing a similar project and the papers im reading say that calculus is required.I just want to be able to rotate shapes like you have done here. I know how to rotate i just dont know how to get the angular velocity/speed.

    Honestly, it took me ages to teach myself how SAT collision works and now this... its a sad day for me.

  • @thecoast47 I knew calculus but would not consider it important. What you want is algebra plus physical laws: given linear and angular velocities before collision (known variables), find velocities after (unknown variables). Constraints: collisions should conserve both momentum and angular momentum.

    Conservation of angular moment involves something called the moment of inertia. I'd recommend the book Game Physics Engine Development by Ian Millington to someone at your level.

  • WOW how did you do this? can you tell me some algorithms?

  • can i see source code?

    this is awsome

  • significant effect on the object's rotation if the low-density protruding edge hit a static object like a very dense object. Would the object spin around its centre of gravity or would it continue to follow the path the centre of gravity was taking while the low-density part simply span around it... Confusing for me anyway... :p

    Right - back to work hehe.

  • Heh, small world. If you did the Graphics module, you would have seen me give a presentation about my fourth year physics engine project.

    You resolve a collision like that by splitting the force into a linear component and an angular component and applying them separately. In your example, the moment of inertia would be low and the torque small, so most of the impact would go into rotation (but some small amount would go against linear velocity).

  • hehe, unfortunately I missed the last couple of graphics lectures because I was revising / finishing my 3rd year project. I just had the graphics exam today in fact, didn't go down well with most people with the general consensus being there was way too much content, lol.

    I saw your physics engine project on the fourth year projects web page while we were trying to decide on our own fourth year project for next year.

  • Comment removed

  • I was thinking of attending your project presentation but I couldn't work out when / where it was and if we were allowed to or not :(

    When i finish my exams next week I'll be having a proper look at all this, I could do with finally getting my head round what 'torque' actually is for a start, haha.

    Jon.

  • Hehe, here's me revising for my 3rd year CS exams at Warwick and I start procrastinating, thinking about whether I should try and improve the physics in an old game I once made. I do a google for 2D rigid body physics and this video pops up. Low and behold, your a CS student from Warwick ;) haha. I was wondering how centre of gravity would effect the physics (and how it would be inplemented). I have objects which have low density edges sticking far out and can't decide if that would have a ...

  • nice!

  • Every Body has 2 Forces, Directional and Rotational.

    How do you compute these force after collision to obtain the reaction?

  • In brief:

    1) I calculate the combined change of linear and angular velocity caused by a unit impulse at the contact point.

    2) I reverse this result to get the impulse required to produce a given change of velocity.

    3) I calculate the change of velocity required for separation (using coefficient of restitution).

    4) I combine these to get the size of the impulse.

    (Impulse = instantaneous force)

    For more information, I recommend the book Game Physics Engine Development by Ian Millington.

  • First I saw your video of this without rotation and wasn't too impressed. But you've added rotation, which is awesome! You've also done a really good job with resting contact!

    I'll be making something like this pretty soon, I had a go before but my collision detection was far too inefficient. You've inspired me to try again.

    Again, really nice work!

  • looks pretty nice ^^d

  • Hey there, 'finally got around to doing rotation eh? :) nice job!

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more