1. I'm new to Unity's way of handling that sorta stuff etc. etc. and I'm just a tad confused - I need to be able to reliably get a point in space relative to an entity's position. I'm working on adding new features to temperature mechanics to give building a little more depth as a part of my Rust Reborn mod (such as having to create ventilation to avoid CO2 poisoning and allowing buildings to heat up over time depending on the layout).

    Unfortunately it seems like the center of the triangle floors and foundations is offset by about 0.833m, which I need to deal with.

    Any advice? Basically I need to get the position of the raycast to be offset to the center of the triangle, but since triangles have different rotations, I need to do so in "context" of each one. Is there a method to get a world position based on an entity and a Vector3 offset?

    The demonstration of the basic principle behind the base warmth mechanics:



    Hope you guys can help me!
     
  2. I believe you can just get the entity's position then add the offset.
    Code:
    var pos = entity.transform.position;pos += new Vector3(x, y, z);
    The new Vector3 would be the offset.
     
    Last edited by a moderator: Aug 28, 2017
  3. That wouldn't account for rotation, would it? That's the difficulty I'm having.