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
3 registered members (NewbieZorro, TipmyPip, 1 invisible), 19,045 guests, and 8 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
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