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 (AndrewAMD, TipmyPip, OptimusPrime), 15,359 guests, and 7 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
Moving camera y WASD keys #380958
08/23/11 07:51
08/23/11 07:51
Joined: Aug 2011
Posts: 4
R
Ragada Offline OP
Guest
Ragada  Offline OP
Guest
R

Joined: Aug 2011
Posts: 4
Hi guys. I'm new o gamestudio and I have ridden a manual. There was a part about moving the object by WASD keys and rotating camera by WASD keys, but there was'nt any tutorial about camera move by WASD keys. Can anybody place example here for moving kamera by WASD keys? (W-forward, S-backward...)

Re: Moving camera y WASD keys [Re: Ragada] #380971
08/23/11 09:12
08/23/11 09:12
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
Why don't you attach camera to entity and move/rotate it with WSAD keys?
Checkout workshops, they will teach you how to move entity, and how to attach camera.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Moving camera y WASD keys [Re: 3run] #381008
08/23/11 12:57
08/23/11 12:57
Joined: Aug 2011
Posts: 4
R
Ragada Offline OP
Guest
Ragada  Offline OP
Guest
R

Joined: Aug 2011
Posts: 4
I have tried it.
Look:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////
ENTITY* my_sky;

function bright_lights()
{
vec_add(my_sky.blue,vector(10, 10, 10));
}

function dim_lights()
{
vec_add(my_sky.blue,vector(-10, -10, -10));
}

function main()
{
on_1 = bright_lights;
on_2 = dim_lights;
level_load ("");
my_sky = ent_createlayer("blood_gorge+6.tga", SKY | CUBE | SHOW, 0);
while (1)
{
if (key_w) camera.x += 2;
if (key_s) camera.x -= 2;
if (key_a) camera.pan += 2 * time_step;
if (key_d) camera.pan -= 2 * time_step;
if (19 == key_lastpressed) // if the [R] key is pressed
{
camera.pan = 0; // restore the initial pan
camera.tilt = 0; // and tilt angles
vec_set(my_sky.blue,vector(128,128,128)); // set a medium sky brightness
}
wait (1);
}
}
But its not working and I don't know what to do.

Last edited by Ragada; 08/23/11 13:03.
Re: Moving camera y WASD keys [Re: Ragada] #381012
08/23/11 13:16
08/23/11 13:16
Joined: May 2009
Posts: 5,377
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,377
Caucasus
You should learn how to use GS, what you mean by "it's not working". Does it crash or something like that?

BTW, you didn't try as I told you to do, move entity with "c_move" and attach camera to it, use small model for an entity.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: Moving camera y WASD keys [Re: 3run] #381014
08/23/11 13:37
08/23/11 13:37
Joined: Aug 2011
Posts: 4
R
Ragada Offline OP
Guest
Ragada  Offline OP
Guest
R

Joined: Aug 2011
Posts: 4
I'll try and that's not crashing...


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