# problem understanding PxContactPairPoint::impulse value

**URL:** <https://forums.developer.nvidia.com/t/problem-understanding-pxcontactpairpoint-impulse-value/30234>\
**Category:** Physics Modeling (closed)\
**Created:** [July 26, 2013, 3:06pm UTC](https://forums.developer.nvidia.com/t/problem-understanding-pxcontactpairpoint-impulse-value/30234 "2013-07-26T15:06:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tournicoti](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tournicoti/32/12259_2.png) [@Tournicoti](https://forums.developer.nvidia.com/u/Tournicoti)\
**Post date:** [July 26, 2013, 3:06pm UTC](https://forums.developer.nvidia.com/t/problem-understanding-pxcontactpairpoint-impulse-value/30234/1 "2013-07-26T15:06:55Z")

</div>

Hello  
I’d like to get the magnitude of the force when a contact occurs. AFAIK the unit of an impulse is N.s (Newton\*second) but the value doesn’t change when I change the simulation’s time step.

```auto
pair<PxVec3,PxReal> getAverageContactPositionAndForce(const PxContactPair & pair)
{
	PxContactPairPoint * contacts=new PxContactPairPoint[pair.contactCount];
	pair.extractContacts(contacts,pair.contactCount*sizeof(PxContactPairPoint));

	PxVec3 position=PxVec3((PxReal)0.0f);

	PxReal force=(PxReal)0.0f;

	for (PxU16 i=0;i<pair.contactCount;i++)
	{
		position+=contacts[i].position;
		force+=contacts[i].impulse.magnitude();
	}

	delete [] contacts;

	position/=pair.contactCount;
	//force/=timeStep; to get a force (in Newton)

	return std::pair<PxVec3,PxReal>(position,force);
}

```

the value of the variable force (without time division) is always the same whatever the time step is … so I get a (very) different force value when I change the time step for a given scene.

I tried the time steps 1/60 and 1/30 and get approximately the same impulse’s magnitude but the second should be the double of the first, shouldn’t it ?

So what’s wrong in my understanding of the impulse value ? Thanks in advance

---

<div class="post-metadata">

**Author:** ![gyeoman](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/gyeoman/32/10078_2.png) [@gyeoman](https://forums.developer.nvidia.com/u/gyeoman)\
**Post date:** [July 29, 2013, 12:16pm UTC](https://forums.developer.nvidia.com/t/problem-understanding-pxcontactpairpoint-impulse-value/30234/2 "2013-07-29T12:16:52Z")

</div>

Hello,

Impulse describes the change in momentum that occurred. I’ll try to explain why I would expect the impulse to be independent of timestep.

Imagine a ball being dropped downwards in a vacuum from a height Y so that it falls and hits a flat plane. The velocity of the ball on impact with the plane is independent of timestep. This makes sense because in nature there is no timestep. In fact, the impact velocity only depends on initial velocity, gravitational acceleration and Y (the height). On impact the ball experiences an impulse so that it changes direction and now moves upwards instead of downwards. The upwards velocity immediately after the impact is -restitution\*downwardsVelocity. The minus sign ensures that the ball’s velocity changes direction, while the restitution value (0 \< restitution \< 1) describes how much momentumis lost to the impact. In this simple case, the impulse is:

impulse = change in momentum = mass_downardsVelocity - mass_(-restitution\* downwardsVelocity) = mass_downwardsVelocity_(1+restitution)

As you can see, this is independent of timestep.

Force, on the other hand, is the rate of change of momentum. As a consequence, force is certainly dependent on timestep.

Hope this helps,

Gordon

---

<div class="post-metadata">

**Author:** ![Tournicoti](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/tournicoti/32/12259_2.png) [@Tournicoti](https://forums.developer.nvidia.com/u/Tournicoti)\
**Post date:** [July 30, 2013, 3:37am UTC](https://forums.developer.nvidia.com/t/problem-understanding-pxcontactpairpoint-impulse-value/30234/3 "2013-07-30T03:37:38Z")

</div>

Hello gyeoman, your answer helps me very much. Thank you  
So I use impulses instead of forces. =)
