# Havok Gravity/Friction Question - Macromedia Director 3D

I'm new to using Havok, so I'm not sure exactly what my question is, but this is the problem I'm having: I'm trying to create a simulation of a marbles game, so I have a number of spheres inside a 5-sided box. The problem is that they never seem to stop moving after an impulse is applied to them. Even when they do finally "stop," they still seem to jiggle a little. It sort of looks like the surface they're resting on is moving slightly or has little dimples in it. I've tried changing friction and restitution values for the ...

1. ## Havok Gravity/Friction Question

I'm new to using Havok, so I'm not sure exactly what my question is, but this
is the problem I'm having: I'm trying to create a simulation of a marbles
game, so I have a number of spheres inside a 5-sided box. The problem is that
they never seem to stop moving after an impulse is applied to them. Even when
they do finally "stop," they still seem to jiggle a little. It sort of looks
like the surface they're resting on is moving slightly or has little dimples in
it. I've tried changing friction and restitution values for the spheres and
box. I've tried setting velocity and momentum values to zero before an
interaction begins. I've tried adjusting gravity, and the higher the gravity
the worse the problem. I've scaled everything up 10 times (because I get an
error if I try to create a rigid body from a very small model) and when I scale
the gravity by 10 to compensate, the spheres never even come close to stopping.
In fact, with 10x gravity they start moving on their own after I stop them.
If I set the gravity very low, it improves considerably, but then it's like
playing marbles on the mooon and that's not what I want to simulate. I think
I've tried adjusting every property that could possibly have any effect, and
still the slight, constant motion. So my question is, what is causing this?
Is there some small, random force that the Havok engine is constantly applying
to the models? Is this the "chaos" that's referred to in the Havok docs? Is
there some other parameter I need to set before or while the user is
interacting with the models? How can I get objects to come to a complete stop
at some point after an impulse is applied to them? In other words, make them
behave like real marbles.

Thanks.

John

jabaro Guest

2. ## Re: Havok Gravity/Friction Question

try the following settings:
on inithavok me
pHavok.initialize(pMember,10,1)
pHavok.gravity=vector(0,-1000,0)
pHavok.deactivationParameters=[100.0000, 0.0100]
end

then try to make more substeps:

on exitframe me
pHavok.step(0.0167, 4)
end

and make the models in the size of 100
for example
radius of 50 or 100 ore more:

like one meter is equal to 100 world units.

give all movable bodies a mass like 100. you can even take higher values, a
box with 100x100x100 meters and a weight of 100 kilos is not realistic, but if
the other movable bodies in the scene have relative values to this, it will
work.

in my tests i set the ground restitution of the fixed bodies to 0.9 and used
the restitution of the movable bodies to make them jump or not.

but you have to test around with all these parameters to make your scene work
well.

i use for all my 3D stuff a puppettempo of 85 fps and try to optimize
everything to this tempo.

by the way the jitter effect is ablosutely normal in a physics simulation. its
allways there. but you can fix movable bodys with lingo, they will react then
like normal fixed rigid bodys.or you can use the deactivation parameters to
sort out bodys that are not moving.

if you want to use the dragparameters you will get "fatal errors" and a crash
in director. but you can use them in the shockwaveplayer without problem. in
authoring mode there is a bug in it.

hondo3000 Guest

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•