I hope I understood your question right: You can use c_trace twice, first to detect the end of the water and second to get the high of the land. Something like this:
Click to reveal..
If the land is low enough, he can climb out, else he can't. ^^
Hilf mir, dir zu helfen!
Re: Climbing Water Edge
[Re: hopfel]
#336271 08/02/1018:0508/02/1018:05
I am having some problems properly tracing both the distance to the wall and the height of the land. Could anyone provide an example of what the c_trace start and target position vectors should look like for both cases?
Re: Climbing Water Edge
[Re: 82RJZAE]
#338461 08/18/1013:0108/18/1013:01
If the player is near the top of the water, and is pushing against a wall, the player will perform a hop up pushing him up and out of the water. No traces involved.
A8 com / A7 free
Re: Climbing Water Edge
[Re: Rich]
#338469 08/18/1013:4908/18/1013:49
You still need trace to measure the height you can climb. Trace when your entity hit the wall.
Code:
fromvec.x = my.ent.z + fcos(my.pan,this_ent_width*2);
fromvec.y = my.ent.z + fsin(my.pan,this_ent_width*2);
fromvec.z = my_ent.z + max_climbable_height;
vec_set(tovec.x, fromvec.x);
c_trace(...);//argh, I forgot what to put here, been a while since I do 3DGS