   Aerial maneuvers
  Hello. I make metamod plugins for HL mods, particularly one called NS. My problem is I want to make this player which is a jetpacker, do a barrel roll just like the banshee in Halo 2. The variables I have is the player velocity in xyz, player origin in xyz, player angle, player view angle, and unit vectors of the player directions in forward,up,right.[Edited by - KCE on August 11, 2006 12:32:26 AM]
Quote:Original post by KCEMy problem is I want to make this player which is a jetpacker, do a barrel roll just like the banshee in Halo 2.Hey don't worry about it, Halo 2 was a great game and it's only natural that you'd want to imitate it; it's not a problem. If it makes you feel better, barrel rolls were around in plenty of flight sims long before then. So even though HL and Halo are competitors I'm pretty sure it won't be a problem; no one's going to come after you.;  On the off chance that you meant to say 'implementing the feature is the problem' (as opposed to the desire of having it being the problem)You will need to learn about some form of Splines so that you can generate the animation/motion path of the canned special manuever(you want this to be a single button-press move, not an acutal flight dynamic right?)... You might get away with doing simple rotations... but that probably wont be as pretty as an artist/designer drawn path.   ;  I just stated what I do just to make sure : )The problem, so to speak, is the math itself which I don't know. I can implement it but I just don't know how to calculate it. My math skills are mostly limited to Trig and some Calculus (I'm in high school) and I've also taken AP Physics. I understand some basic stuff with vectors like transformations and calculations, etc.I do know that I need to change the player's velocity every server frame to match the direction he is supposed to travel in. I think the simple rotations would be fine since I'm more familiar with matrices and I don't think it won't be too noticable because of client prediction.[Edited by - KCE on August 11, 2006 12:37:56 AM];  Hi, if you want the action to be dynamic, you should take a look at quaternions. You would transform the direction and the rotation into a quaternion and you will be free of rotation matrices. The math behind it is quite probably a bit too hard too understand with your level of math, but you might still be able to use it if you just implement the operators for it ;)(wish i had this link when i started out with this :) ):http://www.gamedev.net/reference/list.asp?categoryid=250Greetings   ;Quote:Original post by LimitzHi, if you want the action to be dynamic, you should take a look at quaternions. You would transform the direction and the rotation into a quaternion and you will be free of rotation matrices.To avoid misleading the OP, I think it should be pointed out that quaternions do not have any special properties with respect to making an action 'dynamic' (whatever that means). Furthermore, there is no need to 'free' yourself from rotation matrices.@Limitz: If there's some particular property or characteristic of the representations in question that you have in mind, you might elaborate a bit. As is though, your post doesn't really make much sense.   ;Quote:Original post by jykQuote:Original post by LimitzHi, if you want the action to be dynamic, you should take a look at quaternions. You would transform the direction and the rotation into a quaternion and you will be free of rotation matrices.To avoid misleading the OP, I think it should be pointed out that quaternions do not have any special properties with respect to making an action 'dynamic' (whatever that means). Furthermore, there is no need to 'free' yourself from rotation matrices.@Limitz: If there's some particular property or characteristic of the representations in question that you have in mind, you might elaborate a bit. As is though, your post doesn't really make much sense.Well, it was a bit late on my side of the globe, so i see it could be perceived as misleading. This wasn't my meaning. I was actually following up on a post before mine which said:Quote:(you want this to be a single button-press move, not an acutal flight dynamic right?)... For a single button-press move i'd go for the spline as suggested. But if you want it to be a flightdynamic, i wouldn't go for Euler rotation i.e. rotation matrices, since you have to into account the gimbal lock. I thought using quaternions would make your life a lot easier when you want to implement flight dynamics such as rolls or loops.Greetings.   ;  Could anyone provide me with some code or calculations?   ;Quote:Original post by LimitzFor a single button-press move i'd go for the spline as suggested. But if you want it to be a flightdynamic, i wouldn't go for Euler rotation i.e. rotation matrices, since you have to into account the gimbal lock. I thought using quaternions would make your life a lot easier when you want to implement flight dynamics such as rolls or loops.The part that is misleading is:Quote:Euler rotation i.e. rotation matrices...Euler angles and rotation matrices are not related in any special way. If you don't use Euler angles, or only use them in the context of local rotations, you will not encounter gimbal lock. If you use Euler angles in the context of global rotations, you may encounter gimbal lock.That's it. Whether you're using matrices or quaternions has absolutely nothing to do with it.   