Game Development for Xbox 360, PC + Windows Phone 7

Chapter 5 - Page 98

rated by 0 users
Answered (Verified) This post has 2 verified answers | 3 Replies | 2 Followers

Top 10 Contributor
Male
21 Posts
garfbradaz posted on 25 Aug 2010 3:32 PM

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 :)

Answered (Verified) Verified Answer

Top 10 Contributor
Male
135 Posts

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!

Top 10 Contributor
Male
135 Posts

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.

All Replies

Top 10 Contributor
Male
135 Posts

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!

Top 10 Contributor
Male
21 Posts

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.....

Top 10 Contributor
Male
135 Posts

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.

Page 1 of 1 (4 items) | RSS
© 2011 Chad Carter. All rights reserved.