Gamestudio Links
Zorro Links
Newest Posts
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
[MED] Import from FBX (2010) missing!!!
by rayp. 11/03/26 14:33
What are you working on?
by rayp. 11/02/26 13:57
No connection to MT4
by JeyKey II. 10/29/26 09:34
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (exile, JeyKey II, Grant, 1 invisible), 29,840 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rht, MaliceTheMaker, Haitao_Ren, JimSimons, julienp
19249 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: 604
Austria
Petra Offline
Support
Petra  Offline
Support

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