attaching a Flycam to an object
See original GitHub issueok so i want to attach a flycam behind my spacecraft. I have loaded the geometry into the scene previously:
starship = THREE.SceneUtils.addMesh( scene, geometry, 1, 0, 0, 0, 0, 1.0, 0.0, m );
but i think starship is just a copy of mesh i loaded, and i need a pointer to the object in the scene stack. In order to set its new position matrix.
//get the position of the fly camera
var position = new THREE.Matrix4;
position = camera.matrix;
//set a translation to move the point infront of the camera
translation = new THREE.Matrix4;
translation.setTranslation(0,100,1000);
//multiply the two matrices together
result = new THREE.Matrix4;
result.multiply(position,translation);
I am guessing this wont work: starship.matrix.copy(result); starship.updateMatrix();
Should i approach it through the scene objects like this? i seem to get an error…
scene.objects[0].matrix.copy(result);
scene.objects[0].updateMatrix();
Thanx again.
Issue Analytics
- State:
- Created 12 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
FlyCamera - Babylon.js Documentation
This is a flying camera, designed for 3D movement and rotation in all directions,such as in a 3D Space Shooter or a Flight...
Read more >Flycam - Second Life Wiki
It's also possible to use the FlyCam mode with the very popular Xbox 360 controller, provided you have one you can connect to...
Read more >How would I mount a v-mount battery to a flycam red king ...
I am planning on adding a v-mount battery plate to my flycam red ... r/cinematography - How do you get metal objects to...
Read more >Fly Cam (simple cam script) - Unity Forum
* 1) adding an isColliding bool to allow camera to collide with world objects, terrain etc. */. public float mainSpeed = 100.0f ...
Read more >FLYCAM Vista-II Stabilizing Arm & Vest for Handheld Camera ...
The spring arm and vest connect, assisting the stabilizer and significantly improving the overall functionality and reducing operator fatigue. It lets you ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

addChild()is now simplyadd().I wish closed issues didn’t allow more comments… Specially 1 year old ones…