Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by Grant. 02/24/26 22:21
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
3 registered members (TipmyPip, clint000, Grant), 6,810 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
rotating object #176962
01/08/08 01:46
01/08/08 01:46
Joined: Apr 2007
Posts: 35
texas
over_board Offline OP
Newbie
over_board  Offline OP
Newbie

Joined: Apr 2007
Posts: 35
texas
im looking for a script that will make an entity rotate around the origin or the level along the z(or y) axis. sort of imitating the sun. can some one help me?


New progammer for... Initiate Games (c) 2007 and Sckratch Magazine (c) 2007 http://www.sckratchmagazine.com
Re: rotating object [Re: over_board] #176963
01/08/08 09:53
01/08/08 09:53
Joined: Jul 2005
Posts: 262
Earth, The Netherlands
NL_3DGS_n00b Offline
Member
NL_3DGS_n00b  Offline
Member

Joined: Jul 2005
Posts: 262
Earth, The Netherlands
You mean moving like the sun around the Earth, or like how Earth rotates?
If you mean rotating like how the Earth rotates:

Code:
action rotate()
{
while(1){
my.pan = my.pan + 5;
wait(1);
}
}




The best games are the games you create yourself.
Re: rotating object [Re: NL_3DGS_n00b] #176964
01/08/08 11:15
01/08/08 11:15
Joined: Oct 2006
Posts: 873
S
Shadow969 Offline
User
Shadow969  Offline
User
S

Joined: Oct 2006
Posts: 873
Or in case you wanted a sun-like movement

var offset = 500;//sun offset from level origin
var sun_tilt;

action fake_sun
{
while(1)
{
vec_set(my.x, nullvector);//place at a levels origin
vec_add(my.x, vector(offset,0,0));//add offset
vec_rotate(my.x, vector(0, sun_tilt, 0);
sun_tilt+=5*time;//increase sun tilt
wait(1);
}
}

Re: rotating object [Re: Shadow969] #176965
01/08/08 12:39
01/08/08 12:39
Joined: Sep 2005
Posts: 508
Texas
not_me Offline
User
not_me  Offline
User

Joined: Sep 2005
Posts: 508
Texas
shadow thats exactly what im looking for thank you soo much!


-Initiate Games
-Level designer

http://www.sckratchmagazine.com

Moderated by  adoado, checkbutton, mk_1, Perro 

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