Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (ozgur, Ayumi, VHX, monarch), 1,161 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | 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