beam thru portal
I'm going to make a laser puzzle where you have to aim the laser at a target using rotating mirrors and portals. I eventually found a way to fake it, but it is headache-inducingly complicated.
It involves having fixed portal frames so that the position of the portals is exactly known, extra env_lasers in each frame to make the same beam appear to travel through the portal, a func_portal_detector in each frame and a gigantic pile of logic_branch and logic_branch_listener entities to tie it all together. Oh, and a funky physics gadget that drops when a func_portal_detector fires, in order to determine if the portal just opened or closed. And I almost forgot about the template shooting thing that makes sure that you get a continuous beam, even when one of the portals is placed in an arbitrary spot in the map.
Executive summary:

PS: if you just want the effect, you can place a prop_dynamic and give it the turret model, that will then produce a laser that travels through portals, just like the real turrets. You might be able to hide the turret model in some kind of enclosure.
Quote:
I'm going to make a laser puzzle where you have to aim the laser at a target using rotating mirrors and portals. I eventually found a way to fake it, but it is headache-inducingly complicated.
That was my idea too
Maybe I try that turret thing with portal detectors
I have tried parenting things to the detector (an env_entity maker for example) and these just stay in their original location when a portal lands inside the detector. And I have tried using ForceSpawnAtEntityOrigin, with the detector as the target. This just spawns the object at the entity maker's original location.
Lastly, I have tried to de-activate smart editing in Hammer and adding an origin property manually, but that seems to get ignored by the game.
I read your post on Interlopers.net. If you got this to work, please explain how it's done. That would be very helpful!
EDIT: Never mind, I was being stupid. I didn't realise that the sender of the detector's touch event is the portal itself. So you can send a ForceSpawnAtEntityOrigin with !activator as the parameter. This spawns the template at the origin of the portal.
Anyway, that was a very useful hint. Thanks! 