|
Re: not passable level or block
[Re: Tempelbauer]
#315730
03/18/10 16:15
03/18/10 16:15
|
Joined: Apr 2009
Posts: 69 Karlsruhe, Baden Württemberg, ...
luckyxxl
Junior Member
|
Junior Member
Joined: Apr 2009
Posts: 69
Karlsruhe, Baden Württemberg, ...
|
no "walk-through" is also in A7. But you don't nedd that because it is 90% the same like including <default.c> and press 0.
Do you want to walk around with a person or fly with a cam and do collision detection?
Sry for my bad English!! I'm German!! A7 Extra Edition Intel Core i7-960 (4x3.2GHz), 8GB DDR3, 9800GT 1GB My homepage: www.ultitech.de
|
|
|
Re: not passable level or block
[Re: Kiko]
#315816
03/19/10 11:06
03/19/10 11:06
|
Joined: Apr 2009
Posts: 69 Karlsruhe, Baden Württemberg, ...
luckyxxl
Junior Member
|
Junior Member
Joined: Apr 2009
Posts: 69
Karlsruhe, Baden Württemberg, ...
|
you want to do collision detection with a flying cam, rigth? I made this code for me:
#include <acknex.h>
function create_walk_througth(VIEW* view)
{
wait(1);
my = ent_create(CUBE_MDL, camera.x, NULL);
vec_set(my.pan, camera.pan);
view.clip_near = 0;
while(1)
{
my.pan -= mouse_force.x / 4 - (key_cul - key_cur) * time_step * 5;
my.tilt += mouse_force.y / 4 + (key_cuu - key_cud) * time_step * 5;
c_move(my, vector((key_w - key_s) * time_step * 5, (key_a - key_d) * time_step * 5, 0), nullvector, IGNORE_PASSABLE | GLIDE);
vec_set(view.x, my.x);
vec_set(view.pan, my.pan);
wait(1);
}
}
void main()
{
level_load("level.wmb");
wait(5);
create_walk_througth(camera);
}
just copy the code and replace the levelname... if you want to do collision detection with a player model use c_move (view the manual!) insted of vec_set
Sry for my bad English!! I'm German!! A7 Extra Edition Intel Core i7-960 (4x3.2GHz), 8GB DDR3, 9800GT 1GB My homepage: www.ultitech.de
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|