Hi. I am making a test program regarding raycasting/basic 3d etc. I have a class which gets detected by my raycasting object, which moves around my world to detect walls, enemies, and the like. When the raycaster touches the object, it needs to detect how far along the object it is, to work out which part of the object to render first. However, since the anchor point of an object is in the centre, I have no way of knowing whether I am more or less than halfway:
Because the Actor rotates, I cannot simply do an x/y check to see which is the case, so it would be much easier to calculate distance to one corner of the object, i.e. shifting the anchor point to the corner. I also am unable to just enlarge the image, since it is already invisible and so my intersection test would pick up parts beyond the enlargement. Is there any way to change the anchor/pivot point of my class, or is there another workaround, to find distance to the corner or otherwise?