Michael Gwynne wrote: > Hi again, > I am VERY new to OpenSG, I haven't studied OpenGL or anything, but I am > OKish with C and C++. > I am trying to adapt the "withoutSSM" demo so that I can import the > terrain.wrl, and move the camera around it and zoom in etc... > I have managed to get the 'w' and 's' keys to zoom in and out but they > only do it once each (I cannot keep zooming) > I'm not sure if I'm multiplying the matrices wrong, or have my tree all > mixed up but could someone point me in the right direction?
The code was a bit too big to digest. Small tips: * Try to write some debug output and see what you're doing, the values of matrices, etc. * You need to accumulate transforms in a matrix, not just set it. Your tree is probably fine, but you need to do: mtx *= translate_step_mtx instead of: mtx = translate_step_mtx If it helps. I think it was .mult() or something in TransformMatrix. Cheers. /Marcus ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
