Gamestudio Links
Zorro Links
Newest Posts
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,454 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
confused about quaternions #290423
09/18/09 22:12
09/18/09 22:12
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
Could anyone please explane step-by-step what do I need to do, to script, in order to apply quaternions and do rotations using them. I've read a lot of articles on what a "quaternion" is, about its scalar and vector components. But I am still confused.


a generator of dull questions smile
Re: confused about quaternions [Re: BastovBros] #297352
11/06/09 22:43
11/06/09 22:43
Joined: Jul 2008
Posts: 128
Ukraine
BastovBros Offline OP
Member
BastovBros  Offline OP
Member

Joined: Jul 2008
Posts: 128
Ukraine
Guys, help!!! I have a problem. I have an airplane that rotates in all directions. And I wanna make it fire from its guns. I added a gunfire sprite which will appear when the the "fire" key is pressed. But I have a problem with placing this sprite at the position just in front of the guns. I can place it when the rotation vector is 0,0,0. But when I fly my airplane , the position of the sprite is not fixed, so it moves all the time inappropriately. I think it is a problem with angles and rotation , since the movement of the airplane is too free (all directions). I think quaternions could help, but I have no idea how to use them. I have the quaternions.c, so the quaternion functions should work. Can anyone help me with writing a script for a sprite which should be located at a certain distance in front and to the left of the airplane's center using quaternions? I think I am able to come up with some way to cope with this problem without quaternions, but I wanna use them because the movements with them are smooth and I need them anyway for other things.


a generator of dull questions smile
Re: confused about quaternions [Re: BastovBros] #297430
11/07/09 14:42
11/07/09 14:42
Joined: Apr 2006
Posts: 737
Ottawa, Canada
O
Ottawa Offline
User
Ottawa  Offline
User
O

Joined: Apr 2006
Posts: 737
Ottawa, Canada
Hi!

Is it possible, in your situation, to use
the vertex position of your model and fire away
from there?


Hope this helps!
Ottawa laugh

Ver 7.86.2 Pro and Lite-C

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1