Since this is a common question, I decided to write up something which will hopefully help: http://developer.valvesoftware.com/wiki/Rotation_Tutorial
> -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of > Garry Newman > Sent: Thursday, July 27, 2006 2:46 AM > To: [email protected] > Subject: Re: [hlcoders] Rotation of an entity > > Yeah I know what you mean I think.. If you want to rotate it > using physics it's easier.. Kinda. Well probably harder if > you haven't looked into motion controllers. > > When you apply a motion controller to the physics object you > can decide whether the forces are local or global. If you > choose local and apply torque to it it'll rotate around its > own angles (not the world).. > > I'll be interested in hearing the real solution to this when > you're not using physics - I'm dumb when it comes to angles > and matrices and stuff. > > > On 7/27/06, Steve Rabouin <[EMAIL PROTECTED]> wrote: > > -- > > [ Picked text/plain from multipart/alternative ] No, I know I'm not > > making much sense, I can't really explain this properly.. > > > > Let's say I have a spray can, and i wanted it to rotate on its own. > > When it's on a table, it would rotate with the y angles > only. But if > > it fell on the floor, it would now be facing the floor, and the x > > angles would need to be changed to keep the same rotation > going. What > > I am looking for, is how to find the angles that I need to > add to the > > current angles so that it will rotate in that direction properly, > > whichever position it is facing. Does that make more sense? > > > > Thanks for trying to help :o > > > > On 7/27/06, Garry Newman <[EMAIL PROTECTED]> wrote: > > > > > > Do you mean you want your entity to face the way it's travelling? > > > > > > > > > On 7/27/06, Steve Rabouin <[EMAIL PROTECTED]> wrote: > > > > -- > > > > [ Picked text/plain from multipart/alternative ] Hi, > > > > > > > > I'm still learning through the SDK and I have this simple issue > > > > blocking > > > me > > > > into progress.. > > > > > > > > I'm simply trying to rotate the angles of an entity in > relation to > > > > its position. Changing its angles.y alone for example > is not what > > > > I need. If > > > the > > > > entity is facing down, i need to change the angles based on its > > > > current angles. If it was facing down, i'd probably > need to change > > > > x, but if it > > > was > > > > in between, some of y and some of x would need to be changed, > > > > etc.. So > > > I'm > > > > thinking a function similar (if not) AngleVectors must be used, > > > > but I'm unsure how.. > > > > > > > > Please help if you can > > > > > > > > Thanks > > > > -- > > > > > > > > > -- > > > > _______________________________________________ > > 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

