Jump to content
• Advertisement

# Impulse (really dumb question)

This topic is 5194 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

## Recommended Posts

I'm sorry, but at the moment I'm totally confused...that's why I have to ask this question ;-) Take a look at this scene: The orange object simply flies forward, gets attracted by gravity, crashes onto the ground, bounces off and continues to fly... At the moment of impact, how has the impulse vector to look like? (the one used to change the object's velocity, so that it bounces off) Does it simply point upwards along the collision normal? Or is it slightly leaning to the left/right? I'm really confused about this ^^ I'm asking because in a different thread I was told that friction can be achieved by erasing the tangential component of the impulse vector...so if it simply pointed upwards there would be no tangential component and thus no friction...hmpf ;-) Thanks for your help!

#### Share this post

##### Share on other sites
Advertisement
In the absense of friction the collision impulse will point straight up - in the direction of the collision normal.

If there's friction then it will point up and to the left to some degree.

#### Share this post

##### Share on other sites
"If there's friction then it will point up and to the left to some degree"
that totally makes sense :-D

So I have the fullImpulse, the tangentialImpulse and a frictionValue-value.
To completely remove the tangential component I'd do something like:

impulse = fullImpulse - tangentialImpulse *frictionValue(e.g. 1)

But as you said that's not enough. frictionValue souldn't be limited to 0.0f-1.0f, because we have to have values greater than 1, so that the final impulse gets bended to the opposite direction (right???).
So how would that be done? Where does the greater frictionValue come from, how is it calculated?

(Sorry that I'm posting about this topic again but the last one didn't solveall my problems. ;-) But now I think I'm a little more informed (a LITTLE), so maybe this time it'll work? *hopes*)
Please be patient with me :-)

Thank's for your help

#### Share this post

##### Share on other sites
Assuming your object is a point (or non-rotating object) with a single collision point:

1. You calculate and apply the impulse In in the collision normal direction,

2. Multiplying this by the friction coefficient, frictionValue, gives the maximum tangential impulse, It_max, that could be generated during this collision.

3. However, there's a danger that this tangential impulse will result in the tangential component of the object's velocity changing sign. So, calculate the tangential impulse that would just bring the object to a halt in the tangential direction: It_stop = mass * vt where vt is the tangential velocity component.

4. Apply min(It_max, It_stop) in the tangential direction - the block may slow down, or it may stop, but it won't reverse direction.

Things get more complicated when you consider:

a) both objects colliding can change velocity/have mass etc

b) objects can rotate (then the normal impulse can result in a change in tangential velocity and vice-versa...)

c) dynamic/static friction

#### Share this post

##### Share on other sites
"Things get more complicated when you consider:...."
..but what if that's the case? ;-)

#### Share this post

##### Share on other sites
Quote:
 Original post by VanKurt"Things get more complicated when you consider:...."..but what if that's the case? ;-)

Well, I didn't want to answer more than you wanted - I have work to do!!

But, briefly, the three cases:

a) both objects colliding can change velocity/have mass etc

Rather than dealing in absolute velocities, you now calculate all your velocities relative to one of the bodies (doesn't matter which). And when you calculate impulses you apply the same impulse to both bodies (in opposite directions of course).

b) objects can rotate (then the normal impulse can result in a change in tangential velocity and vice-versa...)

This just makes the relationship between "impulse at a point on a body" and "change in velocity at a point on a body" more complicated - involving moments of inertia etc as well as mass. However, you can find the formulae pretty easily.

c) dynamic/static friction

Get the other stuff working first - this is just "icing on the cake" :)

#### Share this post

##### Share on other sites

• Advertisement
• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• Advertisement

• ### Popular Now

• 16
• 11
• 24
• 42
• 75
• 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!