Jump to content

  • Log In with Google      Sign In   
  • Create Account

XNA: adding 3d model to game


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Ztalei   Members   -  Reputation: 101

Like
0Likes
Like

Posted 02 November 2012 - 11:29 AM

I'm trying to learn XNA for the first time. I don't know C#, but I do have a decent understanding of C++, so this isn't completely unfamiliar to me. But I'm trying to take a character I modeled in Maya and put it into a 3d game. Really what I'm trying to do is make the character display on the screen--there isn't an actual game yet. So I'm following a tutorial in Learning XNA 4.0 by Aaron Reed.

I thought I'd followed everything properly, but I'm getting errors like this: (FYI, Science is the name I picked for the game for now)

Error 2 The best overloaded method match for 'Science.ModelManager.ModelManager(Microsoft.Xna.Framework.Game)' has some invalid arguments C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 41 28 Science

Error 3 Argument 1: cannot convert from 'Science.ModelManager' to 'Microsoft.Xna.Framework.Game' C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 41 45 Science

Error 4 The name 'Components' does not exist in the current context C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 42 13 Science

Error 5 The name 'gameTime' does not exist in the current context C:\Users\Dallas Brittany\Documents\Visual Studio 2010\Projects\Science\Science\Science\ModelManager.cs 71 23 Science

The errors are all in ModelManager.cs, but who knows--maybe I left out something earlier in the tutorial even though it didn't display an error.
I've attached all the files in a .zip. Attached File  Science.zip   3.53KB   26 downloads But I also attached a .png of what I think is the problem area in the code.

Thanks Posted Image

Attached Thumbnails

  • problemArea.png


Sponsor:

#2 Ztalei   Members   -  Reputation: 101

Like
0Likes
Like

Posted 02 November 2012 - 01:48 PM

Anyone?

#3 Debunez   Members   -  Reputation: 160

Like
0Likes
Like

Posted 02 November 2012 - 02:12 PM

You have to add the model manager in the main Game.cs file. You can't add the model manager as a Component of itself you have to add it to the Game.

#4 Ztalei   Members   -  Reputation: 101

Like
0Likes
Like

Posted 02 November 2012 - 02:21 PM

Oh, of course, thanks :) I got so caught up trying to follow the directions that I lost my common sense. I also forgot a capital in gameTime (had gametime), haha. It works!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS