Why doesnt glide work?

Posted By: RyuShinji

Why doesnt glide work? - 02/18/09 05:11

Hi why does my player entity go through the floor even when glide is set on? I'm using c_move & the floor is not passible...

What am I missing?
Posted By: Max_Prower

Re: Why doesnt glide work? - 02/19/09 07:10

I probably won't have a clue as to how to solve this; but I'd like to try. :P

May I see the code? smile

And also, I'm having a similar problem. It goes on the floor just fine but it won't go up slopes. I'm sure it's something to do with move_min_z but I am not sure as to how to solve it.
Posted By: delinkx

Re: Why doesnt glide work? - 02/19/09 07:23

show ur piece of code.
Posted By: Max_Prower

Re: Why doesnt glide work? - 02/19/09 07:27

Here is all of my code, so far. I write is a piece at a time for this exact reason: It's easier to iron out the bugs:
Code:
#include <acknex.h>
#include <default.c>
#include <player.c>
ENTITY* fox = 
{
	type = "foxbody1.mdl";
}


function player_move()
{

	while(1)
	{
		c_move(me, vector(0,15*key_w *time_step,0),nullvector, GLIDE); //Move forward
			c_move(me, vector(0,-15*key_s *time_step,0),nullvector, GLIDE); // Move backward
				c_move(me, vector(-15*key_a *time_step,0,0),nullvector, GLIDE);// Strafe left
				c_move(me, vector(15*key_d *time_step,0,0),nullvector, GLIDE);// Strafe right
		wait(1);
	}
}

function main()
{
level_load ("floor_1.WMB");
camera.z = fox.z + 200;
camera.y = -1400;
camera.x = fox.x;
camera.pan =90;
fox = ent_create("foxbody1.mdl", vector(0,-1272,0), player_move);
}

Posted By: delinkx

Re: Why doesnt glide work? - 02/19/09 07:35

try IGNORE_PASSABLE | GLIDE
Posted By: Max_Prower

Re: Why doesnt glide work? - 02/19/09 07:38

No luck. T-T I'm quite certain that it involves move_min_z. But being a newbie I can't seem to figure it out. frown
© 2023 lite-C Forums