Questions tagged [physijs]

Physics plugin for JavaScript 3D library three.js

Physijs brings a very easy to use interface to the three.js framework.

One of the reasons three.js is so popular is because it is so incredibly easy for graphics newbies to get into 3D programming. Physijs takes that philosophy to heart and makes physics simulations just as easy to run.

70 questions
2
votes
1 answer

Using cannon.js for collision detection in a three.js game

I'm working on something with three.js where i need a way to handle collisions between objects very generally. I was thinking of using cannon.js since it supports the primitives i need but i don't always particularly need/want any of the overhead of…
Quazi
  • 129
  • 1
  • 7
2
votes
0 answers

Physijs Load model three.js collisions don't work

When I load my model(map) with JSONLoader I have a problem with collisions. If I load with BoxMesh it's work but the geometry collisions is like a cube, and my model is not a cube, the middle of my model is empty. And I put an other object (cube) on…
gaet
  • 113
  • 6
1
vote
1 answer

ThreeJS and PhysiJS "Class constructor cannot be invoked without 'new'

I'm trying to implement PhysiJS to my ThreeJS project. To simplify I have downloaded this project from the web: https://rawgit.com/mmmovania/Physijs_Tutorials/master/MultipleBoxes.html My project setup is available…
yabadaz
  • 13
  • 2
1
vote
1 answer

Use physijs to give three.js Questions about adding physical effects?

I created a ground, then I dug a gap in it, and finally added physical effects through physijs. let Mesh = new THREE.Mesh(new THREE.BoxGeometry(800, 10, 800), material); Mesh = new ThreeBSP(Mesh); let Gap = new THREE.Mesh(new THREE.BoxGeometry(230,…
ceshi
  • 31
  • 2
1
vote
1 answer

three.js After importing the model through objloader, how to make the model have physical effect through physijs?

I know through Physijs.BoxMesh Can let three.js The model has a physical effect new Physijs.BoxMesh(Geometry, material, 1) But now my model is imported through objloader. How can I make it have physical effect var objLoader = new…
ceshi
  • 31
  • 2
1
vote
0 answers

How to create a hollow ring with THREE.js?

I has been playing with THREE.js library and I had a problem to make a ring passable (hollow). I created a ring in different ways, even compound shapes with physijs.js but none works, the hollow in the ring is not really hollow. I'm want try throw…
requenaxii
  • 131
  • 1
  • 12
1
vote
0 answers

an error when I used ammo.js and physi.js , what should I do for it?

I want to use Physi.js to make a car , but there has some error, I view my demo at Chrome, and I don't know the error is caused by the file named ammo.js or physi.js ,and following are my codes: var phymaterial = Physijs.createMaterial(new…
lison16new
  • 11
  • 5
1
vote
0 answers

How to make the Camera have collision detection Physi.js First Person Shooter

Project Premise The idea for my THREE.js game is the have the player navigate though a maze of objects and reach an exit. I need collision detection not just for cubes and spheres, but also models imported from Blender. I thought about using…
Sam Trent
  • 395
  • 3
  • 15
1
vote
1 answer

Raycaster does not move BoxMesh objects

I'm using Physijs script for physics like gravitation. I want to move objects in my scene with Raycaster from THREE.js script. My problem is that Raycaster only move objects (simple box) declared like: var box = new…
Rok
  • 133
  • 14
1
vote
1 answer

Physijs where to read about functions?

Can't understand where to know what physijs functions do. There are many functions like applyImpulse, applyForce etc. but there is no documentation for them.
Rantiev
  • 2,121
  • 2
  • 32
  • 56
1
vote
0 answers

Physijs Handle Collisions of Meshes in Groups

I'm trying to identify when a collision occurs between two meshes I've created. The problem is that one of the meshes is nested into a bunch of THREE.Object3D objects, so the collision isn't being detected. When I add another object directly to the…
mjkaufer
  • 4,047
  • 5
  • 27
  • 55
1
vote
2 answers

Three.js - Chase camera for moving sphere rolling on a plane using Physi.js without the camera following the sphere's rotation?

So I have a flat plane, and I'm using up, down, right and left to roll a sphere along it using Physi.js. I want to apply a chase camera to the sphere, but I can't prevent the camera to follow the sphere's rotation? I want the camera to stay behind…
gyllensand
  • 21
  • 3
1
vote
0 answers

ThreeJS: PhysiJS on JSON Object

I can't add physics to a loaded JSON model. The model is displaying but I can't add the addEventListener( 'collision', handleCollision ) to it. The console says "undefined" when I add the listener. I tried it with a normal non-loaded Physijs.BoxMesh…
flashbox
  • 41
  • 1
1
vote
2 answers

Using export from clara.io with three.js and physijs

I have a scene I exported from clara.io, and I can import it in a three.js scene. I modified MateiralLoader and ObjectLoader to add textures loading, but I'm facing a problem, cause I'd like to replace the standard meshes by physical meshes. I tried…
Jo Pango
  • 474
  • 1
  • 5
  • 15
1
vote
0 answers

Sphere inside of a sphere threejs physijs

I'm trying to make a sort of "lottery ball" simulator. I'm having difficulty adding an object inside an object with physijis. Physics work when I add the sphere to the scene, but when I add the child spheres to the main "lottery" sphere, it loses…