How to keep player on a ledge?
Moderator: InsideQC Admins
3 posts
• Page 1 of 1
How to keep player on a ledge?
I want to keep player on a ledge like in new 3d Prince Of Persia games.
I figured how to detect ledge (just traceline 2 lines into ground, one must be whole in a wall, other in an air), although not reliably it seems to work.
I tried to stop player by setting his origin into older position, but after a moment of running against ledge he gained very high speed and run over it. I guess there is some part of Quake code which tries to help if some entity would get stuck and it might be reason ... well, in each case I do not know how to stop player on a ledge.
How to stop a player from going further than a ledge?
I thought about blocking him with something, but I do not know how to keep it in front of him. And I do not want to make such ledges in level editor, I want to simulat them.
Thanks.
I figured how to detect ledge (just traceline 2 lines into ground, one must be whole in a wall, other in an air), although not reliably it seems to work.
I tried to stop player by setting his origin into older position, but after a moment of running against ledge he gained very high speed and run over it. I guess there is some part of Quake code which tries to help if some entity would get stuck and it might be reason ... well, in each case I do not know how to stop player on a ledge.
How to stop a player from going further than a ledge?
I thought about blocking him with something, but I do not know how to keep it in front of him. And I do not want to make such ledges in level editor, I want to simulat them.
Thanks.
-

daemonicky - Posts: 185
- Joined: Wed Apr 13, 2011 1:34 pm
Perhaps try very high values of sv_edgefriction?
Not sure if that will give you the effect you want.
Another thing to try is to put clip brush walls on the sides of ledges so players cannot go off the edge.
Another possibility is to create some sort of custom qc entity that modifies player physics/movement when player is touchng it (same principle as a trigger_ladder)
Not sure if that will give you the effect you want.
Another thing to try is to put clip brush walls on the sides of ledges so players cannot go off the edge.
Another possibility is to create some sort of custom qc entity that modifies player physics/movement when player is touchng it (same principle as a trigger_ladder)
- metlslime
- Posts: 316
- Joined: Tue Feb 05, 2008 11:03 pm
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest