1 registered members (TipmyPip),
18,631
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: Camera code for Lite-C? Anyone?
[Re: Galen]
#295507
10/25/09 18:47
10/25/09 18:47
|
Joined: Jul 2009
Posts: 150
Blackchuck
Member
|
Member
Joined: Jul 2009
Posts: 150
|
here that must work;
action free_camera() { // c_setminmax(my);
VECTOR camera_force; set(my,INVISIBLE|POLYGON); // set(my,PASSABLE);
camera_force.z = 0; vec_set(camera.x,my.x); vec_set(camera.pan,my.pan);
while(1) { camera_force.x = (key_w - key_s)*10*time_step; camera_force.y = (key_a - key_d)*10*time_step; vec_add(my.pan,vector(mouse_force.x*(-7)*time_step,mouse_force.y*7*time_step,0)); c_move(my,camera_force,nullvector,GLIDE+IGNORE_PASSABLE+IGNORE_PASSENTS+IGNORE_PUSH); vec_set(camera.x,vector(my.x,my.y,my.z+15)); vec_set(camera.pan,my.pan); wait(1); } }
Last edited by Blackchuck; 10/25/09 18:54.
I have know Gamestudio/A7 Commercial Edition 7.84
|
|
|
Re: Camera code for Lite-C? Anyone?
[Re: Galen]
#295630
10/26/09 16:18
10/26/09 16:18
|
Joined: Jul 2009
Posts: 150
Blackchuck
Member
|
Member
Joined: Jul 2009
Posts: 150
|
Hmmm... The only functions you can use with "flag" is;
VISIBLE; OVERLAY; TRANSLUCENT; FILTER; LIGHT;
(It stays like that in the handbook)
but try it with "var ISOMETRIC;" also;
action free_camera() {
VECTOR camera_force; var ISOMETRIC;// Give it to a var set(my,INVISIBLE|POLYGON); camera.flags |= ISOMETRIC;// Now no errors should show up
camera_force.z = 0; vec_set(camera.x,my.x); vec_set(camera.pan,my.pan);
while(1) { camera_force.x = (key_w - key_s)*10*time_step; camera_force.y = (key_a - key_d)*10*time_step; vec_add(my.pan,vector(mouse_force.x*(-7)*time_step,mouse_force.y*7*time_step,0)); c_move(my,camera_force,nullvector,GLIDE+IGNORE_PASSABLE+IGNORE_PASSENTS+IGNORE_PUSH); vec_set(camera.x,vector(my.x,my.y,my.z+15)); vec_set(camera.pan,my.pan); wait(1); } }
Not tested. Hope it helped
Last edited by Blackchuck; 10/26/09 16:29.
I have know Gamestudio/A7 Commercial Edition 7.84
|
|
|
Re: Camera code for Lite-C? Anyone?
[Re: Blackchuck]
#295631
10/26/09 16:25
10/26/09 16:25
|
Joined: Oct 2007
Posts: 5,211 İstanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,211
İstanbul, Turkey
|
@Blackchuck, who the hell told you that?(k, before the edit, there was a clear statement that, you should NOT set ISOMETRIC as a flag, but as a var.)
ISOMETRIC is a flag. and Galen is doin it right.
@Galen, what do you mean by it doesn't seem to be working? be more clear(screenshots?), so we can help better.
Last edited by Quadraxas; 10/26/09 16:26.
3333333333
|
|
|
Re: Camera code for Lite-C? Anyone?
[Re: Quad]
#295632
10/26/09 16:27
10/26/09 16:27
|
Joined: Jul 2009
Posts: 150
Blackchuck
Member
|
Member
Joined: Jul 2009
Posts: 150
|
Sorry I changed my post. I reed "ISOMETRIC" wrong 
I have know Gamestudio/A7 Commercial Edition 7.84
|
|
|
|