Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
entity attach to another... #366450
04/03/11 22:32
04/03/11 22:32
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Hi,

I attach a entity to another using this -->

weapon_coord.x = player.x + 21 ;
weapon_coord.y = player.y - 7 :
weapon_coord.z = player.z + 13 ;

vec_set(my.x,weapon_coord.x);
vec_set(my.pan,player.pan);

But i think due to the weapon_coord "offset" when i pan the player, the attached weapon dont pan correctly whit the player.

Anyone know how i can fix this...?

Thx.

Re: entity attach to another... [Re: Altarius] #366452
04/03/11 22:41
04/03/11 22:41
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
weapon_coord.x = 21 ;
weapon_coord.y = - 7 :
weapon_coord.z = 13 ;

vec_rotate(weapon_coord.x,player.pan);
vec_add(weapon_coord.x,player.x);

vec_set(my.x,weapon_coord.x);
vec_set(my.pan,player.pan);


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: entity attach to another... [Re: Superku] #366469
04/04/11 04:11
04/04/11 04:11
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Work perfectly! Thx a lot Superku!


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