Archived

This topic is now archived and is closed to further replies.

translation, rotation, arcball!?

This topic is 5312 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

how do i move towards the "target"? Vector3 target = new Vector3( _d3dd.Transform.View.M13, _d3dd.Transform.View.M23, -_d3dd.Transform.View.M33); target.Normalize(); _d3dd.Transform.View.Translation(target); it seems to work originally but not for long Vector3 target = new Vector3( -_d3dd.Transform.View.M13, -_d3dd.Transform.View.M23, _d3dd.Transform.View.M33); target.Normalize(); _d3dd.Transform.View.Translation(target); and thats how i move back, but after moving around a bit... maybe it has something to do with my rotations? is 13,23,33 even the "target"? is 11,21,31 the "right"? is 12,22,32 the "up"? do i need to normalize it? how do i reverse it? if what operation on a vector reverses its direction? i am using the ms arcball to rotate the screen _ball = new GraphicsArcBall(_parent); _ball.SetWindow(_d3dd.PresentationParameters.BackBufferWidth, _d3dd.PresentationParameters.BackBufferHeight, 50); ... if (_ball.IsBeingDragged) { _d3dd.Transform.View *= _ball.RotationDeltaMatrix; } it seems to work ok but is there any way to restrict a rotation like that so i do not get tilted to the side while i look around? yes i am new

Share this post


Link to post
Share on other sites