Jump to content

BABYLON.PhysicsImpostor is undefined


Recommended Posts

Ok, Im kinda stumped... I have never had a problem getting a physics imposter to work...

Cannon is implemented and included, here is the section of the script causing and error:

var gravity = new BABYLON.Vector3(0, -9.6, 0);
		scene.enablePhysics(gravity, new BABYLON.CannonJSPlugin());
		scene.collisionsEnabled = true;
		scene.workerCollisions = true;
		var player_box = BABYLON.MeshBuilder.CreateTube("p-box", {path: [v3(0.0,0.0,0.0), v3(0.0,2.0,0.0)], radius:0.5, tessellation:8}, scene);
		player_box.position.y = 4.0;

		ground.physicsImpostor = new BABYLON.PhysicsImpostor(ground, BABYLON.PhysicsImpostor.BoxImpostor, { mass: 0, restitution: 0.9 }, scene);

did something change?


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