Jump to content

BJS 1.14 vs BJS 2.2 - a collision anomaly?


Recommended Posts

With the recent monthly "Maze" challenge, I dug out a maze that I started working on in Blender back last winter. I had been using  BJS 1.14 and here is the basic maze:


Maze BJS 1.14


Now as I was trying to stay up to date, I upgraded to BJS 2.2 - and here is that same maze:


Maze BJS 2.2


Walk forward then move the camera to the right with the arrow keys or strike awall with a glancing blow in some way.


In the first case it looks like the camera bounces off the wall, in the second case, the wall bounces of the camera (and it looks ugly :o )


Both scenes use the same simple basic javascript for displaying the scene and the same babylon file for lights, camera and geometry


Only difference is the version of BJS.


Thoughts welcome.


cheers, gryff :)

Link to comment
Share on other sites

And just to get the "complete set" , I just downloaded BJS 2.3


Maze BJS 2.3


And it seems to be functioning well :unsure: .... except it is throwing this error 

Error: Active camera not set

every time i look around with the mouse  - but not with the use of the arrow keys


In fact in the loader.js file I have this code :

var myCamera = newScene.getCameraByName("Camera");myCamera.speed = .1;newScene.activeCamera = myCamera;myCamera.attachControl(canvas, true);

and in the babylon file exported from blender the camera is actually defined as the active camera.


gryff <- tears out more hair :o


cheers, gryff :)


Link to comment
Share on other sites

Hi gryff,

comment out line 51 in loader.js. you are creating two scenes which seems to drive Babylon crazy :-)

That solves the no active camera issue (Thou I have no idea why it is actually happening).

About the bouncing - try reducing the gravity (0,-1,0 or somethin glike that) and see if it is better. Should be working wonderfully then.

Link to comment
Share on other sites

Of memory, versions less than 2.0, some had various bugs hiding, not very accurate (collisions, lights ...). from version 2 many things needed to fix our scene and finally the version 2.3 also fixes bugs on what is collision and many others.


I recommend that version 2.3

Link to comment
Share on other sites

Thanks for the suggestion Raanan - had no effect :( . But I well clean up that loader.js file and try again. And I might have submitted a different maze :o


Dad72 - well there are always going to be issues as we move from version to version - which is why I tend to avoid "alpha" versions. In this case V2 and V2.3 work as I expect them and V2.1 and V2.2 show this odd behaviour. I find that strange but for now will stick with 2.3 :)


Anyway, I will keep trying and looking at things. But any other ideas welcome.


cheers, gryff :)

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