Commit eddacfc2 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

fixed: depend on camera current view

parent 3687e096
...@@ -454,6 +454,7 @@ function x3d_initial_camera_placement(){ ...@@ -454,6 +454,7 @@ function x3d_initial_camera_placement(){
R0 : R0, R0 : R0,
Up0: RC_w.e1(), Up0: RC_w.e1(),
RC_w: RC_w, RC_w: RC_w,
RC_w0: RC_w
}; };
x3dom_setViewpoint(RC_w); x3dom_setViewpoint(RC_w);
......
...@@ -750,7 +750,7 @@ function x3dom_scene_to_real(x,y,z){ ...@@ -750,7 +750,7 @@ function x3dom_scene_to_real(x,y,z){
function x3dom_scene_to_heading(x,y,z){ function x3dom_scene_to_heading(x,y,z){
//var R0 = Data.camera.Matrices.R0; //var R0 = Data.camera.Matrices.R0;
var R0 = Data.camera.Matrices.RC_w.inverse(); var R0 = Data.camera.Matrices.RC_w0.inverse();
var p_w = new x3dom.fields.SFVec3f(x,y,z); var p_w = new x3dom.fields.SFVec3f(x,y,z);
var p_rw = R0.multMatrixVec(p_w); var p_rw = R0.multMatrixVec(p_w);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment