-- [ Picked text/plain from multipart/alternative ] I suggest to get a book dealing with Linear Algebra... Though be warned it is Calculus 2 and 3 topics so it may be hard or not (depends). Linear Algebra is the math of vectors and it basically an invaluable tool for doing 3d engine work. Many natural phenomena that you may need to do are possible with some simple equations from the book.
On 1/19/07, Joel R. <[EMAIL PROTECTED]> wrote: > > -- > [ Picked text/plain from multipart/alternative ] > In math vectors are used to define "direction". But in c++ theres a class > called Vector which holds 3 points. [0],[1],[2] or .x,.y,.z or > [PITCH],[YAW],[ROLL] All the same exact thing, just 3 different ways of > setting the variables, usually whatever comes easier to the coder. I like > using .x/.y/.z myself. > > First you have origins, the point in the world 3D grid that something is > located at. > Lets say i have a guy at point ( 0, 0, 10 ). Our guy is on the z axis > (up) > 10 units. Simple. > Velocity uses the same Vector class but is used as a direction. The > amount > given is how many units it will move in one second according to the values > in each axis. > Lets say I'm at (0,0,0) and I want to move to our guy in 2 seconds. Our > velocity would be (0,0,5). > > In the code they do soemthing like this. > > Vector origin = pEntity->GetAbsOrigin(); > Vector velocity = Vector(0,0,5); > > origin += velocity * gpGlobals->frametime; > > pEntity->SetAbsOrigin( origin ); > > This is basically what the movement system does. Velocity is just a > helper > to know your movement speed and direction. > Origin is what really counts as thats where your model will be located at. > > Hope that helps =) > > > On 1/19/07, Mukkan Yhtiö <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > Could some one explain how Vector Vatriables work? As far as I know they > > hold (x, y and z) coordinates? > > > > If I wanted to manually manipulate a Vector Variable in game I need to > > know > > how they work mathimatically? What they hold entirely and how to > > manipulate > > them in a 3D environment. > > > > I assume when manipulating 3D objects in a 3D environment you use yaw, > > pitch > > and roll as well as x, y and z? > > > > If anyone could briefly explain all this to me I would be eternally > > greatfull. > > > > Thanks. > > > > _________________________________________________________________ > > Express yourself instantly with MSN Messenger! Download today it's FREE! > > http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ > > > > > > _______________________________________________ > > To unsubscribe, edit your list preferences, or view the list archives, > > please visit: > > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > > > > -- > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, > please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > -- _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

