1
vote
0answers
33 views

Three.js camera turning leftside right

In Three.js I am trying to implement an orbiting camera can be rotated around the x and the y axis. I am using these two functions: function rotateX(rot) { var x = camera.position.x, ...
0
votes
0answers
72 views

Collision Detection and Resolution in Three.js

So at the moment am making a simple game using three.js and three.firstpersonControls.js but with the current Three.js r66, they apparently removed checkWallCollision and then in the r67 ...
0
votes
2answers
69 views

what function creates rotation effect in three.js?

which part of the code is responsible for the rotation in this example? Is it the camera or the scene itself? http://threejs.org/examples/#canvas_camera_orthographic
0
votes
1answer
61 views

How would one outline an alpha transparency layer in javscript and/or php? [duplicate]

I simply want an outline/edge detection of the character/item/object that is selected or doing something. I'm seeing lots of versions of this question for different languages, but I would appreciate ...
1
vote
1answer
198 views

Replace a div (with a ball picture in it) with a 3D canvas ball [closed]

I am trying to make a game where you have to keep the ball on a green platform. At this point the ball is a div with a ball image. You can move the ball over the field, all works great. See it in ...
5
votes
1answer
204 views

Walking on a sphere

I'm working on a game which involves walking your character on the surface of a sphere. Using the answer to Arbitrary Rotation about a Sphere, I've written my code as: if (game.isKeyDown(37)) { // ...
0
votes
1answer
709 views

Three.js camera rotation and behavior

I'm just getting into Three.js and the camera is causing some problems. Basically, I want to implement spectator-like movement controls, so that I can move around freely in the scene. The problem is ...
2
votes
1answer
148 views

How good do I have to be at Math to create a 3D game using three.js? [closed]

A question I've often had, how good at Math do I need to be to create 3 dimensional games? I get along with 2d games just fine. I understand everything I'm doing without problems after practise. ...
1
vote
0answers
102 views

Is there an out-of-the-box way to create a custom non-convex polygon in three.js?

Does Three.js offer an out-of-the-box way to create custom non-convex polygon, or do I have to use THREE.Geometry and set faces manually? I'm guessing that ShapeGeometry has something to do with this, ...
1
vote
2answers
3k views

How to handle 3D collisions using raycasting (with a reflection vector?)

I'm making a game using THREE.JS, and I want my character to walk on the terrain, and collide with static 3D objects (=AABB boxes) that are on that terrain. The problem is: THREE.JS has only a ...
2
votes
2answers
1k views

Quaternions - how to limit axis?

Is there any possibility to limit quaternions to move only in x & y axis (like in Eulers- yaw and pitch, without rolling)? I's there any equation or something similar to do this? Some example: ...
1
vote
1answer
3k views

Translate object in world space usings it's local rotation

I'm using Three.JS to render some objects. I'm struggling with some very simple object rendering and translation. The scenario is that I spawn an object at 0,0,0 in world space with 0,0,0 rotation. ...