The Silverilght 5 RC brings with it some new features for 3D and XNA – Effects, RenderTargets, Multisample Antialiasing, and more. We’ll be updating the online content soon, but in the meantime, David Catuhe has written up the key changes here:
Silverlight 5 RC New XNA Features
Posted in: Microsoft, Silverlight, Technology
– September 1, 2011
During your video with John Papa on Solar Wind, you mentioned code to help with Projections from 3d to 2d. Where are these located?
I’m looking for things like:
1) which 3d triangle was clicked?
2) Pinch to zoom type gestures for 3d objects.
For starters, take a look at Viewport.Project and Viewport.Unproject to convert between world and screen space.
You’ll need to use that with 2 different Z values (0 and 1 for example to pick points between the near and far clip planes) so you can get a 3D direction vector into the scene (your view typically has perspective so this angle needs to be taken into account). You can then use this ray to perform intersection tests with bounding spheres and ultimately geometry.
Check out this explanation: http://www.enchantedage.com/xna-picking
And these two samples:
http://create.msdn.com/en-US/education/catalog/sample/picking
http://create.msdn.com/en-US/education/catalog/sample/picking_triangle