Hello. I’m 3D newbie so it may be silly problem. But anyway… I want to implement free-style interactive camera, moved and rotated by mouse, like in popular 3D editors. It seemed to be easy using
Object3D methods like
rotate and so. However I noticed that rotations make followed movement increased by orders of magnitude. I presumed that
Object3D is defigned to cast local to global transforms in easy way, I mean, for example, rotation aroud far pivot were update object position as well. This is probably not true.
var v = new openfl.geom.Vector3D(0, 0, -500);
view.camera.pivotPoint = v;
Here is an output:
Setup,Vector3D(0, 0, -1000)
hscript:0: Moved,Vector3D(0, 0, -990)
hscript:0: Roted,Vector3D(86.8240888334652, 0, -997.596123493896)
hscript:0: Update,Vector3D(86.8240888334652, 0, -997.596123493896)
hscript:0: Moved,Vector3D(175.3846594436, 0, -995.34416945767)
Distance between position vectors before and after second
moveForward is far bigger than
10… Discrepancy grows with rotation angle. Is it bug, misunderstanding or have I just implement position change compensation by hand?