Jump to content

Physic new system


Dad72
 Share

Recommended Posts

Hello,

I feel that there is a problem with the restitution and friction. when its values are 0, an object should not bounce or slide, but that produce excessive ways. 

For example if I add a house to the ground, then a character over the fact character fly in areas housing and the character with it go very high in the universe, then falls and found under the ground Upside down.

Another thing, collisions with the physic does not allow a character to go into a home.

I create a video capture to show the problem: (I have the .mp4 format if you can not read the .ogv. But with google chrome, ogv is live)

http://www.babylon.actifgames.com/bug_physic.ogv

And the code of the physic:

ground:

ground.setPhysicsState(BABYLON.PhysicsEngine.HeightmapImpostor, { mass: 0, friction: 0, restitution: 0 });

House:

house.setPhysicsState(BABYLON.PhysicsEngine.BoxImpostor, { mass: 1, friction: 0, restitution: 0 });

Character:

character.setPhysicsState(BABYLON.PhysicsEngine.BoxImpostor, { mass: 0.3, friction: 0, restitution: 0 });

 

Link to comment
Share on other sites

Hi Raanan,

The houses rebounded still, but there are still some bugs that I find it hard to explain. I remade a video to see the bug after the creation of the character and towards the end of the video.

Perhaps it be because I am trying to create the character of the interior houses ?? In this case, how to create an object inside a house?

http://www.babylon.actifgames.com/bug_physic.ogv

Thank you Raanan.

Link to comment
Share on other sites

@RaananW The house seems more bounce and land no longer disappears. But I still have the problem of friction and restitution. If an object with friction 0 and restitution 0 collides with another object friction 0 and  restitution 0 the two will each object on the opposite sliding eject or are very high in the sky and landed under the ground (which also has an impostor with friction 0 and restitution 0).

See the above video.

I had a playground that will reproduce the bug. You can see abnormal behavior of the two spheres on the ground.

http://www.babylonjs-playground.com/#2DJG5T#0

I had a playground that will reproduce the bug. You can see abnormal behavior of the two spheres.

What I want to do is just put the mass of the objects. no friction, no trips. if an object is build on another he slips next without rebound.

By cons how to create inside of an object? add a kind of furniture inside a house with the physic system? it does not seem possible. maybe it's also a bug

Link to comment
Share on other sites

You can't create an object inside an object. Once an impostor was set, other objects can't penetrate it. To put an object inside an impostor you will need to use the Mesh impostor with double-sided meshes.

In order to allow the person to go inside you will need to either create impostors for each wall of the house (the walls, the ground, the stairs, everything), use the mesh impostor, or use babylon's collision ssystem, which will probably be the right choice in this case.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...