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
0
votes
1 answer

rotation issue on physijs

I am working with this library for a short time, and i have a issue that is killing me. I have 2 cubes, one with phisy.js and another with three.js, and i have a function for rotate them when you press the A, S, D, or W key depending on the rotation…
drtobal
  • 1,005
  • 1
  • 7
  • 7
0
votes
1 answer

Lock multiple Three.js meshes in relation to one another

I've been struggling to figure out how to lock two sibling meshes in a scene, so that when I rotate them their relationship to each other remains fixed. I know this can be done using a dummy Object3D or by adding one object to the other, but I need…
0
votes
1 answer

Three.js Physijs move mesh towards mouse?

So i've been sifting through posts on here and the docs to try and figure out how to get a BoxMesh to essentially follow the mouse. Eventually i'll do joystick touch controls, similar to Heroes of Loot, or other games that use a touch joystick. But…
agmcleod
  • 13,321
  • 13
  • 57
  • 96
0
votes
1 answer

Online game with THREE.js, physijs and Node.js

I'm trying to make a simple web online game using physijs and node.js I found a related source from here (https://github.com/jjoe64/nodejs-physijs) and below is the basic server-side code that I want to use. 'use strict'; var THREE =…
EJ Shim
  • 11
  • 2
0
votes
1 answer

Three.js Physijs.BoxMesh rotateOnAxis

Im trying to rotate a BoxMesh around its Axis. Without Physijs.Scene.simulation() rotateOnAxis works, but with the simulation it doesn't work. With the simulation it does move around its position. this.player.__dirtyPosition = true; // move…
Martijn H.
  • 315
  • 4
  • 11
0
votes
1 answer

physijs -> physijs_worker.js -> ERROR: "runtime not defined"

I´m fairly conversant with three.js (I teach a class on it, tho I'm otherwise no webdevwiz) and I want to add physics with physijs. Forked a copy and am trying to run the Jenga example: The blocks appear and then, after what seems like a variable…
marqso
  • 61
  • 9
0
votes
0 answers

three.js with physijs object material not defined

after creating a litte scenario, with three.js, I tried to implemented Physi.js. I am stuck on the first object, a cube, I try to change to Physi.js. Firefox console tells me, that "object.material is undefined" at Physi.js line 899. I tried the…
Paul
  • 126
  • 1
  • 11
0
votes
1 answer

How to obtain data from the scene simulation with physijs and threejs

I-m working on a demo, it's very similar a one example in this page (http://chandlerprall.github.io/Physijs/examples/body.html ). It's just a box falling down. But I want to calculate the time taken since the box starts falling until it gets to the…
juanpscotto
  • 990
  • 1
  • 13
  • 32
0
votes
0 answers

Generating an block/voxel terrain efficiently without FPS drops?

I'm having a little trouble generating/displaying a terrain using Three.JS without major FPS drops. Here's the code I wrote to create each block and set the correct position: var TO_METERS = 10; var testOb = []; var blockGeometry = new…
Joey Morani
  • 25,431
  • 32
  • 84
  • 131
-1
votes
1 answer

How to load collision mesh from file in Physijs (and Three.js)

I am developing a simple game in WebGL. Mostly, when I search for examples related to Physijs, I see people using spheres and cubes for collision, which they make in the program itself. How would I (like in Source engine) use meshes for collision,…
Terraviper-5
  • 61
  • 2
  • 7
1 2 3 4
5