Please or Register to create posts and topics.

Physics simulation question

So, I'm not sure if anyone else has poked around with this (I'm sure someone has, i can't be the first to have the idea), but how do the Source physics entities (phys_lengthconstraint, phys_ballsocket, etc) function in Portal 2? I tried making a test map where a box was on a column, tied with a lengthconstraint to an entity on the wall (a func_wall, since I couldn't find any other decent-seeming func entities to anchor the phys_lengthconstraint). The box then swings as if on a rop tied to the wall (though no rope is visible, obviously...I'll burn that bridge later).
Here's the thing. I ran the map, and set a portal on a nearby wall and up at the top of the column...and Portal 2 crashes. I try again (both times using Run Map), and this time is survives a little while...I push the box off the column, and it swings as I'd expect... somewhat

Spoiler
since the phys_lengthconstraint isn't tied to any FACE of the cube, it spun around pretty wildly, but I can understand that element at least
I even managed to make it swing through a portal a few times, and it came out the other side. As I was getting ready to experiment further, game crashes again.

Now, I'm no magic whiz with Hammer to begin with, and it's possible I linked something in a weird way so as to just make the calculations hate me. As far as I know, the only way to give something a name in Hammer is to tie it to an entity, and I'm not sure what entity would be most useful here, so maybe that'd fix it. But the broader question would be, would pursuing physics and portal combination puzzles be possible...i.e. is the physics simulation BUILDING complex and powerful enough to handle going through portals? Or does the sudden change in location wreak havoc on the calculations required, and eventually overload the game?

Thoughts?

Portals fuck with the Havok physics engine in absurdly weird ways. In fact, way back in the olden days of 2007, we actually had a contest winning map that basically relied on physics and portals behaving in weird ways. Also keep in mind that the physics are not supposed to be a 100% true-to-life represenation of actual physics calculations. Length contraints don't actually "wrap" around an object like you would expect a physical length constraint like a rope to.

To my knowledge, Havok is the same in Portal 2 as it is in pretty much any other Source game. I know that in Portal 1 they had to seriously hack the physics to get things to work (and they talk about it in the Portal 1 commentary), so I doubt that has changed a great deal in Portal 2.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I'd forgotten that Source relied on Havok.

I know the Source wiki explained that lengthconstraint would clip through objects and other "ropes," but I was trying to test how it'd respond to walls and portals.

Looks like it won't. Not with any stability. I'll still explore having physics elements as part of my puzzles, but I will make sure portals aren't possible near them.

Are there prop wires like in half life 2 for the plugs? perhaps you'd be better off using one of them, though i dread to think what would happen if you closed a portal on one.

Being Welsh since 1992
Welsh Mullet wrote:
Are there prop wires like in half life 2 for the plugs? perhaps you'd be better off using one of them, though i dread to think what would happen if you closed a portal on one.

I haven't combed the world models yet. Being that I don't have a copy of half-life 2, I'm not sure what I'll find for their props. I think that the plugs were still held by lengthconstraint effects in HL2, and there was just a prop or model of some kind scripted to be visible. Not entirely sure how that works...Garry's Mod does the same thing with its rope tool.

And yes, closing a portal on one would almost certainly crash the game. That, or it'd just clip through the walls.

Yeah, move_rope works in Portal 2. I forget how they acted in Portal 1 going through a Portal, I'm pretty sure they worked mostly fine.

[Important Threads] Forum Rules | Welcome to the new Thinking With Portals
Please do not Private Message me for assistance. Post a thread if you have questions or concerns.
If you need to contact the staff privately, contact the Global Moderators via Discord.

I finally hashed out a puzzle to make for my first real attempt at Hammer, so I'm tabling this...but anyone who does experiment with it, please let me know what you find.

move_rope...what/where is that?

I tried using a rope in portal one, but since portals are just a render of the room form a certain point, the rope "jumped", so instead of going through the portal, it just went straight through a wall to the attatchment point.
http://developer.valvesoftware.com/wiki/Keyframe_rope