Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
4 registered members (rht, EvanTJ, JeyKey II, Quad), 12,569 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Moving in direction #235192
11/06/08 13:16
11/06/08 13:16
Joined: Sep 2008
Posts: 13
Croatia
ponco123 Offline OP
Newbie
ponco123  Offline OP
Newbie

Joined: Sep 2008
Posts: 13
Croatia
Hi!Can tell my somebody how to camera move forvard but in direction which it is.Thanks

Re: Moving in direction [Re: ponco123] #235296
11/06/08 21:22
11/06/08 21:22
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
You need to use the relative direction vector (local coordiantes, rotation coordinates) not the absoulte direction vector (world coordinates).

Here is a little action that provides a traditional FPS style movement...

Code:
action act_player()
{
var vec_player_movement[3];
var player_speed = 4;
var player_eye_height = 30;
player = me;

while(player!= NULL)
{	
my.pan -= mouse_force.x*player_speed*time_step;
camera.tilt += mouse_force.y*player_speed*time_step;
camera.pan = my.pan;
camera.tilt = clamp(camera.tilt,-70,70);

vec_player_movement[0] = player_speed * (key_w - key_s)* time_step;
vec_player_movement[1] = player_speed * (key_a - key_d)* time_step;
     			
c_move(me,vec_player_movement,nullvector,GLIDE);
vec_set (camera.x,player.x);
camera.z += player_eye_height;
	
wait(1);
}
}


Enjoy...

Last edited by DJBMASTER; 11/06/08 21:32.
Re: Moving in direction [Re: DJBMASTER] #235372
11/07/08 11:48
11/07/08 11:48
Joined: Sep 2008
Posts: 13
Croatia
ponco123 Offline OP
Newbie
ponco123  Offline OP
Newbie

Joined: Sep 2008
Posts: 13
Croatia
Thanks!


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