Terminal velocity, jump distance, and calculating trajectory
Also, lets say I want a player to use two portals to bring a box to terminal velocity, then they place a portal on an angled surface to launch the box across platform. How do I determine where it will land? Is this trial and error? Do I just use some basic physics to calculate it? Is there a handy thing in Hammer I'm missing? How do I easily calculate trajectories?
http://developer.valvesoftware.com/wiki ... ns#Jumping
By looking at the grid you can eyeball how many units separate two objects if you kept track of how many times you refined the grid.
I haven't done a whole lot of portal mapping but for angle I'd say it's a pretty safe bet that your player will exit a surface perpendicular to it.
As far as the entering an exiting, I've got the perpendicular part, but its the velocity that I'm trying to figure out. Currently, if I want to get it just right, I just have to keep adjusting it, booting up the map and trying it, then repeating. It is very time consuming. Surely there is a better way?
I suggest you do what I did and make a test map with white walls at different heights and see how far you get launched. Then you could use this as reference for different maps you make later.
Remember: that if you are falling into a portal straight down and come out of one straight up; you will fly up the distance you fell. However this is different for objects where they eventually lose momentum.
chickenmobile wrote:
Faith plates use a trigger and an info_target to launch a player to a certain spot. I guess you could use this entity to make a player fly exactly where you want them to but the problem with this is that even if you fall with no speed into a portal and touch the trigger you will still fly over that distance
That doesn't have to be a problem, if you use threshold checking. From the Aerial Faith Plate wiki page:
Quote:
You can use the trigger_catapult anywhere you expect the player to slingshot. For example, you may place a portal on a wall angled upwards and sling out of that. For greater control on where the player lands use a trigger_catapult.To make sure the catapult doesn't fling you when you just walk into it, set the thresholds. In the trigger_catapult settings:
Property Name Value Lower threshold This is a percentage, 0 to 1, of the player speed you set. Upper threshold Same as above but for the upper limit. UseThresholdCheck 'YES' to use threshold, 'NO' to always catapult.For example, say you set the catapult to fling the player at 500 units/s. Lower threshold 0.1 means the player must travel at least 10% of that; 50 units/s. Upper threshold 0.5 means the player cannot travel faster than 50% of that; 250 units/s. As long as the player speed is between these limits the trigger_catapult will enable.
NocturnalGhost wrote:
That doesn't have to be a problem, if you use threshold checking. From the Aerial Faith Plate wiki page:
Good find! For me thresholds are explained in a very complex way.
Does it mean that you have to travel at least 10% of the normal speed it would take to get there and if you're travelling over 50% of the speed needed it won't activate?
Except it's not a value from 0 to 100 but a value from 0 to 1.
So 50% is 0.5.
Edit:
If you want to see those trajectory lines type in console:
developer 1
ent_bbox trigger_catapult