Jump to content

mesh.ellipsoid with collision objet


Dad72
 Share

Recommended Posts

Collisions on objects that fact from the center of the object and not from the top of the objects.
When I'm on the field I can walk on the floor but if I climb on an object, I am the center of the object, not the top object.
 
The collision with the severity of the above the object is not working properly. but lateral collision works well.
 
Is this normal behavior?

 

 

 

Link to comment
Share on other sites

I really think it's a bug or vertical collisions is not calculate correctly. I think that I was not very clear in my explanations. Here image to accompany what I mean.

 

Here I should walk on top of the object, but I'm on the center of the object. the collision by the Y axis is not taken into account. on the X axis and the Z collision work properly I do not get into the object. only of top.

 

 

Same thing when I went downstairs, I'm still at the center of each tread and not on top.

 

 

There, ok, I'm on the field I ellipsoid does not sink into the ground.

 

 

Code I use: (I just put the big lines used)

scene.gravity = new BABYLON.Vector3(0, -0.75, 0);scene.collisionsEnabled = true;ground.checkCollisions = true;objet.checkCollisions = true;meshPlayer.ellipsoid = new BABYLON.Vector3(0.5, 1.0, 0.5);meshPlayer.ellipsoidOffset = new BABYLON.Vector3(0, 3.0, 0);meshPlayer.applyGravity = true; meshPlayer.moveWithCollisions(forward);

Thanks

Link to comment
Share on other sites

On the playground, it functioned properly. so I looking at my why it did not go.

in fact I have put my ground has 0 in Y,  can go up the stairs one above and it functioned.

That's strange. This behavior seems to be with the heightmap terrain but not on level flat ground.

 

If I can reproduce the problem, I would stay here, it's a bug that seems very sneaky.

 

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...