Why does applyImpulse to a Cylinder fail using Havok physics?

Hi, Babylon.js Community.

I’m still very new to the community and trying to learn how to use the Havok plugin and am confused about using applyImpulse. I believe I understand the principles of using applyImpulse from other engines I’ve tried but don’t understand why applyImpulse to a cylinder body seems to fail? I’m trying to use the cylinder type physics body in a project for my player character. The applyImpulse example link in the Babylon.js documentation works well with a sphere shape:

However, it doesn’t work when I modify that playground’s code to use a cylinder instead:

Any suggestions?

Thanks! :blush:

it works but you didn’t add the code with pointer event to apply the impulse


Thanks, @Cedric, you’re right! I apologize; I did add the code with the pointer event in the original playground I was working with, and it didn’t work. I then copied it over to another browser and used that playground for the message but must not have copied the whole code. It seems mobile iOS Safari doesn’t always work well with Babylon.js (the initial reason I decided to use another browser since iOS Safari would not let me properly save the playground). iCab Mobile Browser on mobile iOS works much better.

Again, thanks again and have a good upcoming weekend. :+1::blush:

1 Like