Havok Physic issue unable to move the cans using the platform

Hi
I have an issue with Havok Physics; it’s unable to move the cans using the barrel platform is there any solution ?

Please share a PG. its difficult to telle you what’s wrong without.
Did you try to increase friction?

1 Like

Did you try to increase friction?

Yes, but it has no effect

1 Like

@eoin , is there a way to make the cylinder follow without adding force in collision event?

1 Like

Yes, the reason it appears there’s no friction is that when changing the position like that, it’s essentially teleporting the body, so the body sort of “appears” in the new location, instead of traveling through the intermediate space.

Instead of teleporting the body, you can use PhysicsBody.setTargetTransform(), which will calculate velocities so a body reaches the target in the next step; I’ve just changed line 85 in that playground:

4 Likes

@Cedric I was using setPhysicsBodyTransformation to teleport a body, after 7.13 throws “Invalid prestep type set to physics body.”

@mpaleo.meetkai can you share a PG?

1 Like

hey! @Cedric
here I modified the SetTargetTransform playground to use setPhysicsBodyTransformation instead

I was using setPhysicsBodyTransformation to teleport a car body when missing a race checkpoint

Yes, physics prestep is disabled by default, you’ll have to enable it.

https://doc.babylonjs.com/features/featuresDeepDive/physics/prestep

EDIT: The warning is not very explicit. I’ll fix it.

1 Like