-
-
Notifications
You must be signed in to change notification settings - Fork 36
Description
Brush-entities ignore the origin property and always end up positioned at the center of their geometry, making it impossible to make rotating entities with TBLoader (doors, levers, fans, etc).
It would be nice if one could define the point of rotation, by defining the origin property in TB.
(TB doesn't currently have a good way to edit origins, but one can use a dummy point-entity, and copy-paste the origin value to the brush-entity.)
I tackled this in my fork and I found a possible fix. I found that libmap itself seems to create brush geometry relative to the entity's center or something, so fixing this at a core level might be tricky. Also because changing that code will also affect world geometry.
So the way I fixed it is perhaps a little hacky, but seems to work fine. Basically it's just two steps:
- don't position the node at
ent.centerif it has anoriginproperty - if it has
origin, then adjust the position of its children (ent.center - origin)