question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Camera rotation to a camera target position

See original GitHub issue

Hi I’m actually wirting a Three.js client of IMML ( http://www.vastpark.org/wiki/1/What_is_IMML ). And by exemple in my XML that describe my 3D scene I have for a camera :

<Camera Name="LeftCamera" Enabled="False" FOV="60" NearPlane="0.01" FarPlane="1000" Rotation="0.7416796,1.606321,0" Position="-12.24768,14.11299,7.066072" />

And I having some issue at converting the rotation to a vector for my camera.target.position

Any idea ?

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
mrdoobcommented, Apr 26, 2012

You just drove me crazy 😉

1reaction
mrdoobcommented, Aug 22, 2011

Do you need a target? If not, you can do this:

camera.useTarget = false;
camera.rotation.x = xml_data.rotation.x;
camera.rotation.y = xml_data.rotation.y;
camera.rotation.z = xml_data.rotation.z;
Read more comments on GitHub >

github_iconTop Results From Across the Web

MATLAB camorbit - Camera Views - MathWorks
Rotate the camera horizontally about a line defined by the camera target point and a direction that is parallel to the y-axis. Visualize...
Read more >
Camera Target – Google Earth Studio
The easiest way to set a Camera Target is directly in the Camera view. Simply right-click the point where you want your camera...
Read more >
Rotate camera around target - Input - Community | MonoGame
I want the camera to be rotatable by moving the mouse. When the mouse is moved horizontally, the camera should rotate around the...
Read more >
Camera rotate to face target ? - Unity Forum
I have free camera that move and rotate around in level. In this script if tb = true, I want my camera to...
Read more >
Camera - LearnOpenGL
Subtracting the camera position vector from the scene's origin vector thus results in the direction vector we want. For the view matrix's coordinate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found