Jump to content

AbstractMesh.moveWithCollisions bug?


Recommended Posts

I'm not 100% sure what's happening..

If meshPlayer.ellipsoidOffset.y is default 0
and you try to move on anything but a strait("flat") line, it bugs and collides instantly with the wall mesh without even being near. (See console.)
E.g. destination.y = 1 && meshPlayer.position.y = 1 && meshPlayer.ellipsoidOffset.y = 0 === works, anything else doesnt seem to work unless setting ellipsoidOffset.y..

see lines 38, 47 & 49 & console.

http://playground.babylonjs.com/#CBIPDN // Doesn't work, onCollide is triggered as if we hit the wall infront of us, even through we didn't. (no movement because of meshPlayer.destination = null; on collision detection)

http://playground.babylonjs.com/#CBIPDN#1  // Works


Any thoughts? :mellow:

Link to comment
Share on other sites

Hi @Sebavan 

You're just re-applying the destination vector everytime onCollide removes it :P 

  -> onCollide triggers // This is the unexpected behaviour / bug, the box doesn't visually collide with anything.
   -> Removes destination

 -> set destination 

> Repeat 

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.

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.


  • Recently Browsing   0 members

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