Jump to content
  • Advertisement
Sign in to follow this  
Cappah

XNA-WinForm Mouse not rotating 3D Camera

This topic is 1826 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

I'm building a level editor and I've been stuck at getting the mouse to work properly. I've managed to display

a model at the Vector.Zero coordinates with my camera set at Vector3(0, 50, 150).

 

Keyboard input works as it should as an independent Free Camera. My end goal is to get the camera to

freely move and rotate around a scene. The problem comes when I'm trying to pitch and yaw the camera

by mouse. I've set the camera to supposedly rotate in whatever direction by moving the mouse while holding

the right mouse button down. But what happens is that the second I click the mouse button, my model disappears.

I tried using a bigger model (terrain this time) and the same results happened. From my code, does anyone see the

the problem?

 

 

 Attached is the free camera and custom panel for displaying and updating.

 

**NOTE** 

The Draw method in the panel class acts in place of Draw and Update in a regular XNA project (for those that don't know

about XNA within WinForms). 

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!