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
4 registered members (NewbieZorro, Grant, TipmyPip, AndrewAMD), 12,885 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
Wrong results? #109483
01/28/07 07:33
01/28/07 07:33
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
Hello,

When I change “pan_earth.roll” the position of the entity
must change, but it keeps on the same position.

The position is calculated right for the first valve of
“pan_earth.roll” when I start the game; but it isn’t changing
when “pan_earth.roll”changes.
Why? There is a "while(1)".

var pan_earth[3];
var p_x;
var p_h;
var p_m;
var size_c=1;
var temp2[3];

Action set_positions(){
While(1){
p_x=74.1;
p_h=14;
p_m=51;
size_cat=1;
temp2.tilt=(pan_earth.tilt-90)+p_x;
temp2.roll=(pan_earth.roll-((360/24)*p_h))-((360/1440)*p_m);
temp2.pan=0;
temp.x=400+5*size_c;
temp.y=0;
temp.z=0;
VEC_ROTATE(temp.X,temp2.pan);
vec_set(an_entity.x,temp.x);
wait(1);}}

Last edited by Freddy; 01/28/07 07:34.
Re: Wrong results? [Re: Freddy_dup1] #109484
01/28/07 12:15
01/28/07 12:15
Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
Puppeteer Offline
Expert
Puppeteer  Offline
Expert

Joined: Jan 2007
Posts: 2,247
Deutsch Niedersachsen
var pan_earth[3]; is wrong
because roll is [6]
It must be
var pan_earth[6]; if youre using roll

Omega


Formally known as Omega
Avatar randomness by Quadraxas & Blade
http://omegapuppeteer.mybrute.com
Re: Wrong results? [Re: Puppeteer] #109485
02/01/07 19:10
02/01/07 19:10
Joined: Feb 2003
Posts: 211
Unna
F
Freddy_dup1 Offline OP
Member
Freddy_dup1  Offline OP
Member
F

Joined: Feb 2003
Posts: 211
Unna
Thanks,

but it still doesn't work.

Even if I use seperated variables:
var pan_earth_pan;
var pan_earth_roll;
var pan_earth_tilt:

Is there something else that might be wrong?

Re: Wrong results? [Re: Freddy_dup1] #109486
02/01/07 20:43
02/01/07 20:43
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
Just use c_rotate(entity, vector(pan,tilt,roll), glide); you dont need those calculations, see in the manual about c_rotate.

And a vector its 3 values(var vec[3]) with magnitude and direction. Do not know what pan_earth[6] have to do with this question.


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