Gamestudio Links
Zorro Links
Newest Posts
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
Zorro plugin for Hyperliquid.xyz
by opm. 10/28/26 13:50
Icon "OP"
by JeyKey II. 10/27/26 07:03
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 8,322 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
MaliceTheMaker, Haitao_Ren, JimSimons, julienp, julienper
19248 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Moving an entity in his local direction using a global vector #299056
11/20/09 18:41
11/20/09 18:41
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
Hi, i want to move an entity towards the direction wich the entity is looking using global vectors. i've tested with this vector:

Code:
vector(cos(nave.pan)*key_m, sin(nave.pan)*key_m, sin(nave.tilt)*key_m)



But in this code each axis depends only of one angle, but it must depend of two, for ex. axis X depends of the pan an tilt of the entity, axis Y depends also of pan and tilt, anz axis Z depends of tilt and roll.
How I can do this?


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: Moving an entity in his local direction using a global vector [Re: painkiller] #299061
11/20/09 20:46
11/20/09 20:46
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline
Member
XD1v0  Offline
Member

Joined: Jun 2008
Posts: 151
Ukraine
Try this smile
Code:
VECTOR dist;
 vec_set (dist,vector(100,0,0)); 
 vec_rotate(dist,my.pan);
 vec_add (my.x,dist); // move entity on x axis in local coord




A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: Moving an entity in his local direction using a global vector [Re: XD1v0] #299068
11/20/09 23:48
11/20/09 23:48
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline OP
Serious User
painkiller  Offline OP
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
it works perfect! thank you so much laugh


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB

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

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