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
0 registered members (), 1,238 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19059 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 | 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