Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
rotate entity around vector doesnt work #401893
05/25/12 16:15
05/25/12 16:15
Joined: Aug 2011
Posts: 133
Germany, Supergeheimes Hinter-...
G
gameplan Offline OP
Member
gameplan  Offline OP
Member
G

Joined: Aug 2011
Posts: 133
Germany, Supergeheimes Hinter-...
Hi,

i need to rotate some entities around a dircection given through a vector in the global coordinatesystem. I want to rotate with the angle alpha_w in degree. Here my code:

ang_add(you.pan,vector(alpha_w*vec_normal.z,-alpha_w*vec_normal.y,alpha_w*vec_normal.x));

But this doesnt work. After Rotation, the entity has a wrong orientation relatet to the given rotationvector. I also tried ang_rotate, but with the same result.

Whats wrong with this? I just did it like in the manual.

Thanks


Version: A8 free
OS: Windows 10
Re: rotate entity around vector doesnt work [Re: gameplan] #401947
05/26/12 20:24
05/26/12 20:24
Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany
Pappenheimer Offline
Senior Expert
Pappenheimer  Offline
Senior Expert

Joined: Sep 2003
Posts: 5,900
Bielefeld, Germany


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