Stairs, Ramps and things ... please help

I need some help with stairs :-).
Using previous physics engines, I’ve had no problems creating and using ramps to access higher levels in my environment. I’ve even checked the previous scripts and they are still working ok. But with Havok, the camera just seems to jump back from the ramp I’ve created. If I hit a wall or another mesh with the camera, it just slides around it as expected. But if I hit the ramp (flat box set at about 35 degrees. It jumps back without animation.
Should I change the box to a plane ? Am I missing something with Havok ?
Demo at https://ukcpg.co.uk/scripts/dynamic.php

Well that’s blown that idea. I’ve reverted back to Cannon with my new project and it’s still doing it.

This problem made me curious so I made a playground for you: https://playground.babylonjs.com/#R66K4K#131

This seems to be a good model for your scene. Let the box (aka sphere) come to rest. Slowly click the box towards the ramp. See how it starts to bounce back?

I could fix it by either applying more force or using a sphere bounding box.

1 Like

Thanks for thinking about it :slightly_smiling_face:
The problem I have, is not with a object mesh against a ramp mesh, but the camera against a ramp mesh.
The camera is moved by mouse/keys, and has an ellipsoid bounding mesh and I dont know how you can effect the mass of a camera.
Strangley on another project with exactly the same settings for the camera, it works ok, but for some reason on my latest project it doesn’t, and for the life of me, I cant find what I’ve done did different.

I’ve copied some code from my script to demonstrate what I mean :slight_smile:

Oh oops, sorry. For some reason I thought there was a Havok physicsBody moving around.

Maybe like this: I got it working by messing with gravity (credits to the docs, not me): https://playground.babylonjs.com/#YL2BUR#12 But I am not sure where else the gravity constant is used. MIght break other stuff?

Thanks so much :slight_smile:
I assumed because I was setting a gravity value with the Havok library, that I wouldn’t need to set it again with the scene.
I’ve gone back and re-read the instructions and it seems obvious now :slight_smile:
I’ve applied it to my project and its working great !