rotation collision response?

Please don't post Bullet support questions here, use the above forums instead.
Isawyou
Posts: 20
Joined: Wed Sep 02, 2015 10:00 pm

rotation collision response?

Post by Isawyou »

Hi all!
when this impulse based equation can equal to zero:
w'=w+(j/I)*r*n;
n normal contact;j impulse;I inertia; from wiki https://en.wikipedia.org/wiki/Collision_response[^]
seems wrong to me;
I'm just talking about center of percussion! what happen to angular velocity?http://labman.phys.utk.edu/phys135/modu ... ge3294.gif it's zero right, not working in impulse based method(and also the sens of angular velocity, I get it always wrong)!
can somebody give a source code about how to calculate angular velocity, or just give me some implementation examples, please I'm lost thanx!
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: rotation collision response?

Post by Dirk Gregorius »

It looks as if a cross product is missing. It should be r x n. Here is a good derivation:
http://www.essentialmath.com/AngularImpulse.pdf
Isawyou
Posts: 20
Joined: Wed Sep 02, 2015 10:00 pm

Re: rotation collision response?

Post by Isawyou »

well! thanks I figure that out!
Isawyou
Posts: 20
Joined: Wed Sep 02, 2015 10:00 pm

Re: rotation collision response?

Post by Isawyou »

I have two points manifold, should I apply W to them both?
c for center;p1 and p2 contact point ;

-----------------c-----------------
p2_________________ p1

this bar won't fall!


--------------------------c-----------------------
p2|___________| p1

this bar will fall!
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: rotation collision response?

Post by Dirk Gregorius »

You apply equal and opposite impulses at each contact point. Each off center impulse will indeed affect the angular velocity. I don't want to sound offensive, but you might want to study some basic rigid body mechanics before trying to implement a physics engine.
Isawyou
Posts: 20
Joined: Wed Sep 02, 2015 10:00 pm

Re: rotation collision response?

Post by Isawyou »

I'm doing my best! :wink:
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: rotation collision response?

Post by Dirk Gregorius »

Good luck! :)
Isawyou
Posts: 20
Joined: Wed Sep 02, 2015 10:00 pm

Re: rotation collision response?

Post by Isawyou »

Is v=w*r a cross product too? :shock: is r a vector or magnitude? how to calculate v=wr?(that's crazy if there is vx and vy in 2d)