All Questions
364
questions
0
votes
1
answer
53
views
Three.js Rotation Timer
I am attempting to make an object rotate in three.js. However, my goal isn't that simple. I know how to make an object rotate, but what I want is for it to rotate for a certain amount of time instead ...
0
votes
1
answer
76
views
ThreeJs: How to rotate an already animated object
I have created an object (spaceship) in Blender, animated its movements (make it wobble/rotate a bit randomly) and exported the 3D model to ThreeJs.
If the user presses LEFT ARROW, the model should ...
0
votes
0
answers
89
views
Get camera position and orientation after changing angle 90 degrees
There is an object in space. Currently I can change the view the object by 90 degrees to an x, y, or z axis. However, the user may tip the object or rotate the object. My desire is to change axis by ...
0
votes
1
answer
59
views
How Can I Make This Car Rotate Properly With or Without Merging Meshes(Three.js)?
The problem that I have here is that I'm trying to make a car game here but the problem is that as you can see the wheel's are rotating but not along with the car, here is the code I have in my car.js ...
0
votes
0
answers
71
views
Using tween.js in three.js to do rotation on x, y and z of a gltf
I am having a difficult time to do a rotation on all axis in one statement. This is a loaded gltf that a mesh of it needs to do multiple rotations on x, y and z. My code using a single axis with ....
0
votes
0
answers
70
views
How to make a Spherical Joint anchor follow an object
I mean by Spherical Joint anchor, is the same as the one is used in the rapier documentation example . I mean by an object, a .glTF model that I loaded.
Please check my Sandbox
I am trying to make the ...
0
votes
1
answer
45
views
How to align object with drop shape function (Piriform Curve)
I am trying to place the objects based on an equation, so let us say that I want to draw a circle.
Please check my codesandbox
so I use this function to get the coordinates of x and y..
const ...
1
vote
0
answers
79
views
Why Three.js 90 degrees doesn't looks like it rotates 90 degrees
I have a three.js cylinder that I need to rotate 90 degrees from its center.
When the cylinder is not rotate it looks like this:
The code for the cylinder when its not rotated is this:
const ...
2
votes
1
answer
143
views
Prevent model from rolling when applying quaternion
How do I rotate a model and keep the model from rolling sideways? Using quaternions work fine when applied directly on an axis. As soon as I do more than one axis, the model starts twisting.
Original ...
0
votes
1
answer
114
views
Casting multiple rays from a rotated mesh
I'm trying to shoot multiple rays from a rotating mesh.
The rays are shooting in multiple directions (targeting points on a circle divided by the number of rays).
For debugging purposes I've added ...
0
votes
0
answers
62
views
Three.js pin object to right side of another
I have a cube and a sphere, both created into three.js. Now the cube moves around and rotates, while the sphere is stationary. I want the sphere to always be on the right side of the cube, regardless ...
1
vote
0
answers
81
views
Rotating around an arbitrary axis without changing its previous orientation
So i am simulating a foreward kinematic chain in Three.js. The chain contents of cylindrical joints and static links inbetween. The links are static and should only be rotated and translated according ...
1
vote
0
answers
180
views
how to get the world y plane of the camera and [negate?] it
Im looking to set the value of y in the commented code cameraDir.y = 0; to be the y = 0 plane of the camera after q or e is pressed in if (input._keys.a)
// if (input._keys.a) {
_R.copy(this....
0
votes
0
answers
726
views
Three.js: Rotate object with lookAt() while located at the current lookAt() position
I'm trying to implement a simple turn-around-and-move feature with Three.js. On mouse click, the object is supposed to first turn around and then move to the clicked location.
Codepen
The rotation is ...
0
votes
0
answers
389
views
Rotate object to face the mouse cursor
I can't figure out how to properly rotate an object in ThreeJS. The object is a simple box geometry that is rendered from above somewhere on the screen.
Codepen with the full code.
The object is ...