Jump to content
  • Advertisement
Sign in to follow this  
KCE

Aerial maneuvers

This topic is 4483 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by KCE
My 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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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=250

Greetings

Share this post


Link to post
Share on other sites
Quote:
Original post by Limitz
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.
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.

Share this post


Link to post
Share on other sites
Quote:
Original post by jyk
Quote:
Original post by Limitz
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.
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.

Share this post


Link to post
Share on other sites
Quote:
Original post by Limitz
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.
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!