Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 03/05/26 02:58
zorro with ccxt?
by opm. 03/03/26 03:17
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 5,266 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
math question: getting the turret to align to a battleship (C++) #333557
07/17/10 05:11
07/17/10 05:11
Joined: Jul 2010
Posts: 11
A
akinkhoo Offline OP
Newbie
akinkhoo  Offline OP
Newbie
A

Joined: Jul 2010
Posts: 11
I am trying to get the turret to tilt and roll along with the battleship as the wave hits. however i am uncertain of how to convert/add the battleship's rotation(tilt, pan, roll) into the turret rotation since the turret doesn't face the same direction as the battleship and has it's own panning.

i need some math help translating the rotation.

one option i am considering is to copy the battleship rotation entirely, and then figure out how to add the turret's panning relative to the battleship in the world axis. is this even logically correct? what math technique can I use?

Re: math question: getting the turret to align to a battleship (C++) [Re: akinkhoo] #333566
07/17/10 08:09
07/17/10 08:09
Joined: Apr 2008
Posts: 600
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 600
Austria
Just set the turret angle to the ship angle, and then rotate it by the turret's own angle with ang_rotate.

http://manual.3dgamestudio.net/avec_ang_add.htm


Gamestudio download | 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