XNA Essentials

Game Programming for Xbox 360, PC + Windows Phone

NAVIGATION - SEARCH

Chapter 5 - Page 98

HI CHad,



On page 98 and 99 concerning the Creating a Stationary Camera, you have the following statement:


 


"We can do this by adding the following code to the end of our demos Update method"



Should this be the Draw method?



Cheers Chad :)

garfbradaz - Wednesday, August 25, 2010 @ 3:32 PM

Re: Chapter 5 - Page 98

Yes, we should most definitely call the DrawRectangle code inside of the Draw method and not the Update method. It will work, but definitely shouldn't be there.  The code has it right, I just wrote the wrong method when writing the book. 


Thanks!

Chad Carter - Friday, August 27, 2010 @ 6:02 AM

Re: Chapter 5 - Page 98

Im loving the book Chad, just taking a while for Matrix Multiplication to sink in, and Transformations! :)


 


BTW - Do you use the Anal ISROT (http://xnaessentials.com/forums/t/92.aspx) on each object seperately e.g:


 


2 objects, so i apply the ISROT to the 1st object, THEN another ISROT to the 2nd? Or do i do or the Scaling first for both, then all the rotations for both etc etc etc.....

garfbradaz - Friday, August 27, 2010 @ 6:45 AM

Re: Chapter 5 - Page 98

You can definitely do it however you see fit.  I'll typically get each object in the exact position (including orientation, scaling, etc) before moving on to the next.  When you get to the point of trying to load an entire 3D scene it typically makes sens to transform each object before iterating to the next.  But you can definitely scale each one then rotate each one, etc.

Chad Carter - Monday, August 30, 2010 @ 6:38 AM