Forum

How to keep player on a ledge?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

How to keep player on a ledge?

Postby daemonicky » Thu May 05, 2011 2:51 am

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. :)
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm

Postby metlslime » Thu May 05, 2011 8:28 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)
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby daemonicky » Fri May 06, 2011 3:43 am

Can I move this clipbrush around?
User avatar
daemonicky
 
Posts: 185
Joined: Wed Apr 13, 2011 1:34 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest