Center Flying Through Portals

Avatar
Denominator
19 Posts
Posted Mar 01, 2014
Hello,

I am developing a puzzle involving a long sequence of jumps (10 in a row), and in testing I am finding that half the time I hit the edge of the portal on the very last jump, unless I adjust my trajectory at the last moment. I would like to minimize this issue.

Note: I am already using info_placement_helpers, which help immensely.

A couple ideas come to mind:
1) Create invisible "guide rails". I do not like this idea - there will likely be friction, and the loss of side-to-side movement would detract from the testing experience.
2) I have noticed that Portal 2 has a built-in "magnet" effect which guides the in-flight player towards the portal. Is there a way to increase this effect?

Thanks in advance!
-Denominator

Advertisement
Registered users don't see ads! Register now!
Avatar
CamBen
973 Posts
Posted Mar 01, 2014
Replied 24 minutes later
Maybe a point_push pushing inwards with a force of about -30 might help.
Avatar
Denominator
19 Posts
Posted Mar 01, 2014
Replied 19 minutes later
Thanks CamBen! point_push looks very useful!
Avatar
TeamSpen210
608 Posts
Posted Mar 01, 2014
Replied 33 minutes later
You can use trigger_catapults (like faith plates) to make a player land at a specified spot, and adjust speed and direction. Put over the exit portal surface, and set "Use Threshold Check" to Yes so the catapult will only activate when players/cubes are within a certain speed. Set "Entry Angle Tolerance" to something between 0-1 so going the wrong way won't trigger the catapult. 0=180? accuracy is required, 1=they must be perfectly in line to trigger.

Valve has trigger_catapults on most of their flings, it works very well. There's also a setting that lets you prevent the player from moving in midair for a specified number of seconds, so they can't mess up the jump. Some music tracks (mainly Wheatley/Old Aperture) have versions for when the player is flinging, you might want to add an ambient_generic that is played OnCatapulted.

Avatar
srs bsnss
552 Posts
Posted Mar 02, 2014
Replied 3 hours later
I second that. Trigger_catapults are used extensively throughout the game, and will do exactly what you're trying to do.
Avatar
Denominator
19 Posts
Posted Mar 02, 2014
Replied 13 hours later
@TeamSpen210 Thank you very much! I appreciate that you went out of your way to explain how to best utilize the trigger_catapult for this scenario. Especially since yes, the player will be going both ways through the portal surfaces.

@srs bsnss Thanks for the confirmation! I agree, trigger_catapult sounds perfect for what I am trying to do.

Advertisement
Registered users don't see ads! Register now!
Avatar
TeamSpen210
608 Posts
Posted Mar 02, 2014
Replied 1 hour later
In the three Valve example maps for single player (sp_a2_trust_fling,sp_a3_speed_flings, sp_a4_laser_catapult) they would all use trigger_catapults to control flings.