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.
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
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.
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.
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 ...
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.
This has been flagged as spam show
Hey buddy, you could post some source... I have trouble to find how is the rotation reaction made.
Viej0 1 month ago
Comment removed
Viej0 1 month ago
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 7 months ago
@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.
Draknek 7 months ago
WOW how did you do this? can you tell me some algorithms?
meming4 1 year ago
can i see source code?
this is awsome
mnmboy9147 1 year ago
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.
JonnyCasey 2 years ago
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).
Draknek 2 years ago
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.
JonnyCasey 2 years ago
Comment removed
JonnyCasey 2 years ago
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.
JonnyCasey 2 years ago
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 ...
JonnyCasey 2 years ago
nice!
piepersongg 2 years ago
Every Body has 2 Forces, Directional and Rotational.
How do you compute these force after collision to obtain the reaction?
reexre 2 years ago
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.
Draknek 2 years ago
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!
ninjakannon 3 years ago
looks pretty nice ^^d
BurnerPat 3 years ago
Hey there, 'finally got around to doing rotation eh? :) nice job!
eFFeeMMe 3 years ago