Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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: 594
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 594
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