-- [ Picked text/plain from multipart/alternative ] Do you think anyone of you could help me fix it if you have some spare time? It is a huge file.
And i have no clue what CrossProduct, or the whole pMesh thing I have does..lol Thanks Kramer On 3/14/06, Michael Kramer <[EMAIL PROTECTED]> wrote: > > Found the problem, don't know howto fix it, but For this weapon, i used > alot of code from the strider (well the client effects) > > and I found this part: > > // Compute direction vectors for the sprite > Vector fwd, right( 1, 0, 0 ), up( 0, 1, 0 ); > VectorSubtract( CurrentViewOrigin(), vecOrigin, fwd ); > float flDist = VectorNormalize( fwd ); > if (flDist >= 1e-3) > { > CrossProduct( CurrentViewUp(), fwd, right ); > flDist = VectorNormalize( right ); > if (flDist >= 1e-3) > { > CrossProduct( fwd, right, up ); > } > else > { > // In this case, fwd == g_vecVUp, it's right above or > // below us in screen space > CrossProduct( fwd, CurrentViewRight(), up ); > VectorNormalize( up ); > CrossProduct( up, fwd, right ); > } > } > > Vector left = -right; > Vector down = -up; > Vector back = -fwd; > > Which, when I fooled around with it, really messed up where the sprite was > being drawn. > > So anyone know how to get this to goto the muzzle? > > On 3/14/06, Jay C. <[EMAIL PROTECTED]> wrote: > > > > Have a look inside Studio_FindAttachment. > > Try and create a debug version of it, and run that. Find out why the > > muzzle > > attachment is returning that position. > > > > > -----Original Message----- > > > From: [EMAIL PROTECTED] [mailto:hlcoders- > > > [EMAIL PROTECTED] On Behalf Of Michael Kramer > > > Sent: 14 March 2006 23:53 > > > To: hlcoders@list.valvesoftware.com > > > Subject: Re: [hlcoders] Some Positioning Troubles > > > > > > -- > > > [ Picked text/plain from multipart/alternative ] > > > How would it help here? I know it reaches that code. What message > > would I > > > print? The Value of the vector? something like that? > > > > > > On 3/14/06, Jay C. <[EMAIL PROTECTED] > wrote: > > > > > > > > Add a few debug messages to the code :\ > > > > > > > > It helps a lot. > > > > > > > > > -----Original Message----- > > > > > From: [EMAIL PROTECTED] [mailto:hlcoders- > > > > > [EMAIL PROTECTED] On Behalf Of Michael Kramer > > > > > Sent: 14 March 2006 23:29 > > > > > To: hlcoders@list.valvesoftware.com > > > > > Subject: Re: [hlcoders] Some Positioning Troubles > > > > > > > > > > -- > > > > > [ Picked text/plain from multipart/alternative ] > > > > > Well it shouldn't. Also, this is for the MP SDK, > > > > > > > > > > and the position changes whether or not I have > > > > > > > > > > #Ifdef CLIENT_DLL > > > > > > > > > > //code > > > > > > > > > > #endif > > > > > > > > > > or > > > > > > > > > > #Ifdef CLIENT_DLL > > > > > #else > > > > > > > > > > //code > > > > > > > > > > #endif > > > > > > > > > > Or just no tags, but still not there, and the only time I set the > > > > > startPos > > > > > is there, with LookupAttachment("muzzle"); And the weapon is using > > the > > > > > irifle model, > > > > > and the attachment is named right. > > > > > > > > > > Any more ideas? > > > > > On 3/14/06, Jorge Rodriguez < [EMAIL PROTECTED]> wrote: > > > > > > > > > > > > Michael Kramer wrote: > > > > > > > > > > > > >This should set startPos to the pos of the muzzle, but, it does > > > not. > > > > > > >In fact, it looks as iff it is shooting from my shoe, well a > > little > > > > bit > > > > > > more > > > > > > >over , but down on the ground still. > > > > > > > > > > > > > > > > > > > > The default SDK model has an attachment point on each foot. > > Perhaps > > > > the > > > > > > code is for some reason using the wrong attachment point? Maybe > > you > > > > > > should ascertain that it is not using the foot point by mistake. > > > > > > > > > > > > -- > > > > > > Jorge "Vino" Rodriguez > > > > > > > > > > > > > > > > > > _______________________________________________ > > > > > > 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 > > > > > > > > > > > -- > > > > > > _______________________________________________ > > > 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