I’m using XNA 4.0 to develop a 3D game for Windows Phone 7. What I want to ask is how do I capture touch on 3D model? Currently I have a 3D main character on a height map and a 3D monster. What I want to do is when I touch the monster, the main char will slash him.
Any idea?
I’m using XNA 4.0 to develop a 3D game for Windows Phone 7. What
Share
This is a bit complicated, but here is some solutions…
You can just generate a screen aligned bounding box, and check for collisions with it. This is the least accurate, but simple to implement.
You can invert your monsters transformation matrix, then transform the coords for the touch with the new transformation matrix, and then run your favorite collision detection algorithm on the model, and the touch coords. This will give you the most accurate results.