camera manipulation X axis rotation

Nov 4, 2010 at 10:44 AM

The sample application for camera manipulation has an issue with x axis rotation when passing through 90 and 270 degrees.  I have coded this myself and have the same issue, the rotation matrix itself looks fine but the result when applied to the camera at 90 degree (and multiples of +/-180) cause discontinuity and is clearly visible on the sample application.  Bizarrely rotation in the other axis works just fine.  Any chance this could be looked at as I suspect it's an easy fix but it is a very serious issue for me with the application I have written as I use this feature extensively.

Coordinator
Nov 4, 2010 at 8:27 PM

Hi,

if I'm understanding you correctly, the flipping occurs when the camera direction is perpendicular with the Up vector of the Camera, which is at 90 degrees pointing directly down or up. From the point of the flip, the camera is flipped.

  
I've had this question a couple of times before, but never quite understood what would be the desired effect. If one looks at 3DSMAX for instance, the same effect will occur there. 

Do you have a video of something showing what you'd like it to look like in that scenario.

Nov 7, 2010 at 8:28 PM

The sample application in question is at: http://www.vcsconsulting.co.uk/ThreeDTestPage.html

If you click on the viewport and then up arrow the camera will rotate around 0,0,0 and at 90 degrees the camera flips - I just want the rotation to continue excatly as it does in the Y axis (right arrow).  So if I was rotating a world globe you would pop over the North pole and start heading south over the north pacific towards the south pole (at least from Europe) as in the old X-Com games.

Also, I have having some issues setting object colours, in Balder 8.8.6 the following worked fine but in 8.8.8 everything turned out blue and in 8.8.9 they turned invisible (Note, I didn’t use 8.8.7)

           uielement.Color = new Color(row.R, row.G, row.B, 255);

Then in 8.8.8  I used the following code in place of the above to get the colours I wanted, in 8.8.9 they are now all black (so I am using the 8.8.8 code at the moment):

             Material = new Material()

            {

              Diffuse = new Color(row.R, row.G, row.B, 255),

              Ambient  = new Color(row.R, row.G, row.B, 255),

              Specular = new Color(row.R, row.G, row.B, 255),

              Shade = MaterialShade.Flat

            }

 What is the official means for setting the colour of a solid object that will be consistent over builds?

Coordinator
Nov 10, 2010 at 3:17 PM

Hi, 

sorry for late answer.

I need to look more into the camera problem. For now, you can sort of work around it - a really cheezy solution, but would work for the exact app you have there. Instead of manipulating the camera. Let the camera sit still and then wrap all your content in a container and rotate it instead.

As for your Color vs Material question. I would need to look more into it. This could be a bug when setting these things programatically, basically setting the Color property should be enough - why that does not work kinda beats me. It works in the tests I've done in Xaml. 

Coordinator
Nov 10, 2010 at 3:18 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Coordinator
Nov 10, 2010 at 3:20 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.