Heavy balls falling on slope

Hello guys , here I am trying to reproduce kind of “indiana jones” scene.
So , the character will go up on the slope trying to avoid heavy falling balls like in this PG
Problem is that in this case heavy balls does not produce any impact or force on the character.
I set a much bigger mass parameter on spheres but still not working.
How can I got really heavy balls sto push down the slope my character ?
Thanks!!

I see that the capsule doesn’t collide with sphere(s).

Ok ,im sorry , PG was properly saved this time

When I remove your setting of character linear velocity, the sphere pushes the character when hit, a little bit. Maybe something is wrong with your code that modifies velocity. Note that there are built-in functions for setting both angular and linear velocity damping. Here’s an organized summary of physics properties.

When I set friction of sphere, ground, and character to 0.1, the character should move a lot more when hit, but doesn’t. Not sure why.

Edit: playing a little more it looks like setMassProperties() is resetting the mass you tried to set initially when creating the physicsAggregate. You might consider using physicsShape and physicsBody directly instead of physicsAggregate (which is a conveninece function designed for easy porting from physics V1).

First the mass of the physical body, your character is too heavy, and the ball is too light.

Secondly, the controller input calculates the speed of your character, and it will pull your character’s speed down to 0 very quickly.

So the solution is to increase the mass of the ball. And apply a separate drag coefficient when there is no input.

Coincidentally I’m currently working on something similar.
Vite + Vue + TS (character-7vo.pages.dev)

1 Like

I modified it by increasing the mass of the ball (line 75), and then slightly decreasing the strength of the input force (line 132).
Are you satisfied with the result?

3 Likes

Thanks my friend !! setting the mass property to a bigger value makes the difference.
In my case I used 1 for the character and 100 for the ball, I thought It should be enough for the ball to push back the character.
Lets suppose I would like to represent a real human body, is it ok to set 70 to 100 for mass property ?
thanks !!

I’m not sure what the unit of mass for havok is. But I’m guessing the unit is g. So I’m currently using something like 70,000 or something like that.

Thanks … very important data.

Here’s how I’ve reasoned out the units based on a few experiments. I’d love an expert to chime in.

Havok itself appears to be unitless. When you specify 9.81 for gravity, you’re tying both distance and mass to units because havok translates the imposed (gravitational) force to an acceleration of an object based on a calculation related to the object’s mass (F=ma).

9.81 decomposes into meters and kilograms. This also implies density units of kg/m (used in PhysicsShape).

That said, there are both precision limitations as well as hard-coded values within Havok that put practical limits on which units can be used if you choose different units through specifying the value for gravity.

2 Likes

There is the Havok document - https://eclass.hmu.gr/modules/document/file.php/TP194/Havok%20Xtra%20Lingo%20Reference.pdf - where mass is defined in kilograms.

3 Likes