StrataSource / Portal-2-Community-Edition

Task tracker for Portal 2: Community Edition
https://www.portal2communityedition.com
146 stars 3 forks source link

Portal 2 Bug: Laser Catchers with custom models have incorrect trigger size #1541

Open Konclan opened 9 months ago

Konclan commented 9 months ago

Describe the bug

Centered laser catchers resize their trigger in code, but any custom centered laser catcher models do not Custom Model: 20230923145750_1

Regular Model: 20230923145753_1

To Reproduce

Set the laser catcher entity to use a custom model Cry about it

Operating System

No response

vrad-exe commented 9 months ago

(If you need example custom models to test this with, BEE2 has a few)

AWildErin commented 5 months ago

Generally, what would you want in this place? Something like this is a bit iffy to implement, less from actually implementing it, more "How do we implement this that's not crazy for the end user". There are multiple approaches, and we could easily make an extent vector kv for this entity. But, that's not a decent catch-all solution. For instance, an extent vector wouldn't work very well for catchers that are offset.

TeamSpen210 commented 5 months ago

It already spawns the point_laser_target at a position chosen by an attachment point, so offset catchers should be fine. It's just the size that needs to be specifiable. I'd suggest a vector KV for half-size, where the default 0 0 0 uses the hardocded model-based logic (allowing vanilla catchers to work fine), then it uses choices in the FGD to let you chose from centered/offset/relay presets. Just need to ensure that's rotated by the attachment point angles if necessary, so the KV is in local space.