|
|
Re: Problem with Jump/Fall Code [GER/ENG]
[Re: Espér]
#379110
07/29/11 15:38
07/29/11 15:38
|
Joined: May 2009
Posts: 5,377 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,377
Caucasus
|
No try to move your character with it, instead of using multiply calls of c_move instruction. You'll need to make only one call with "my.dist_x" and then change all those three defines. BTW, for gravity you better use absolute force, like this:
c_move(my,vector(my.dist_x,my.dist_y,0),vector(0,0,my.dist_z),IGNORE_PASSABLE|GLIDE);
May be this will help you to solve the problem, it may be was caused by multiply c_move calls.
|
|
|
Re: Problem with Jump/Fall Code [GER/ENG]
[Re: 3run]
#379112
07/29/11 15:45
07/29/11 15:45
|
Malice
Unregistered
|
Malice
Unregistered
|
I didn't really look at your code (should do that though), but I'm using a modified version of the improved player movement code and I've never had the problem of sinking in the floor after a jump. So I figure it might be worth your time to take a look at the simple jump code in it and see what they did differently.
|
|
|
Re: Problem with Jump/Fall Code [GER/ENG]
[Re: Espér]
#379120
07/29/11 16:19
07/29/11 16:19
|
Malice
Unregistered
|
Malice
Unregistered
|
You use obj.in_jump to track it's jump state, have you watched this var to see if it enters the land state late? Also I'm not sure what obj.objekthoehe is but is it possible that your condition in land is being set to low by this?
Last edited by Malice; 07/29/11 16:23.
|
|
|
Re: Problem with Jump/Fall Code [GER/ENG]
[Re: Espér]
#379123
07/29/11 16:25
07/29/11 16:25
|
Malice
Unregistered
|
Malice
Unregistered
|
could this be your problem.
while(obj.roofdist > (obj.objekthoehe/2))
this is the model center plus max height. But you what the model to stop at the positive min.z , wouldn't simple removing the "/2" fix your problem?
|
|
|
Re: Problem with Jump/Fall Code [GER/ENG]
[Re: Espér]
#379127
07/29/11 16:41
07/29/11 16:41
|
Malice
Unregistered
|
Malice
Unregistered
|
OK... I'll wait. Leave creator.objekthoehe = (creator.max_z*2); but change while(obj.roofdist > (obj.objekthoehe/2)) to while(obj.roofdist > (obj.objekthoehe))
|
|
|
|