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
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 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
Attach weapon incorrectly #323839
05/17/10 19:01
05/17/10 19:01
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
Hi everyone:
I use a third person camera, 3dgs v7.84
I have problems with the orientation(pan) of the attached external weapon. I use this code at start and entity is at idle.
everything is OK
vec_for_vertex(temp.x, soldier, 338);
vec_set(my.x, temp.x);
my.z -= 20; // change the position to visually be ok
my.x -= 12;
my.pan = 90;

At soldiers rotation the weapon seems to be in the wrong position at the wrong rotation. Near the vertex but offset.
I know that is the offset I added at first to be visually OK.
I compensated the weapon pan by using
my.pan = -65 + soldier.pan;
and the weapon points to the target as the entity rotate.
How can I adjust while turning to be visually correct.
Thanks in advance.

Re: Attach weapon incorrectly [Re: monchito] #323854
05/17/10 21:25
05/17/10 21:25
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I don't know if I understood you correctly, but try this:

vec_for_vertex(my.x, soldier, 338);
vec_set(temp,vector(-12,0,-20));
vec_rotate(temp,soldier.pan);
vec_add(my.x,temp);


"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: Attach weapon incorrectly [Re: monchito] #323878
05/17/10 23:40
05/17/10 23:40
Joined: May 2006
Posts: 53
Puerto Rico
monchito Offline OP
Junior Member
monchito  Offline OP
Junior Member

Joined: May 2006
Posts: 53
Puerto Rico
A little adjustment in the coords and worked perfect/
Thanks


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