Posted By: Chameleon_Man
Classic problem: character floats - 12/09/07 07:45
Hi. My character is floating above the ground when I don't want him to be. Here's my code...
move_mode = ignore_you + activate_trigger + glide;
ent_move(vector(x_momentum,0,0),vector(0,0,z_momentum));
I notice that when I run into walls and other characters, theres a gap, almost like theres a large invisible box around my character. Any advice? Thanks!
Posted By: Nems
Re: Classic problem: character floats - 12/09/07 13:14
It seems you only have x and y vectors in there and no z vector which is what gravity relies on.(not familiar with the method)
Then again, you have a double vector statement rather than one.
Never liked that sort of gravity control as it takes too much to balance forces I find.
Try vector(x_momentum, 0,z_momentum)
Posted By: JazzDude
Re: Classic problem: character floats - 12/09/07 17:56
You may have a large invisible box around him. Hit F11 twice to check the size of the bounding box.
Posted By: Chameleon_Man
Re: Classic problem: character floats - 12/09/07 18:13
No,thanks though, but that's not the problem, the way ent_move works is ent_move(relative,universal). Gravity works as a universal force, while the players movement works as a relative force (walk forwards or backwards).
Jazz. The box feature must be new, it's so cool. Anyways, the box is placed under my character, and it's in the shape of a cube. Is there anyway for my to adjust the dimensions and position of the box? Thanks!
Or are there any other suggest for gravity?
Posted By: JazzDude
Re: Classic problem: character floats - 12/09/07 18:55
Place c_setminmax(me); in the character's action.
Posted By: Chameleon_Man
Re: Classic problem: character floats - 12/09/07 20:11
Edit: Works great now, THANKS!
Posted By: Nems
Re: Classic problem: character floats - 12/10/07 01:41
Ok, thanks for the pointer and good one JazzDude