• Attaching a 2D3D text to a door entity
    1 replies, posted
I know it's definitely possible. I'm trying to see how one would go about attaching a 2D3D text to a door. I know Lua quite well, I just don't know every bit of syntax. The main issue is not that I don't know how to use 2D3D, it's that I am unsure how I would make text appear on a door if it has varying thickness. I'm sure a prop_door_rotating would be easy for me but what about just regular door entities? They can be any size! How would I detect the thickness of a prop? Or a door entity? Or a Brush? Alright, so maybe this is a little bit misleading. I just want to detect the thickness of walls (brushes) and doors. Preferably if this works for every entity, including prop_physics, that would be really cool as well. Thank you for your time!
look up the OBBMax and OBBMin functions. Together they let you find the bottom most and top most corners of the bounding box. Together this can be used to calculate it's dimensions. You can use OBBCenter to determine the "true" center of the bounding box. Enjoy the math xD.
Sorry, you need to Log In to post a reply to this thread.