So using local space it is working as designed. The issue is that if I am not using local space I don't know how to use the relative rotation of the target. For example I want to have the camera 10 units behind the target, but since the z axis is absolute in this case I cant just say z=-10.
I assume there's likely an easy way to do what I want here :)
Yes, using local space will also use the scale of the target. I'll look into adding an option to ignore the scale :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
Sry for the double reply here, would it be possible, as you are fixing that, to add more anchor options as well? Instead of just having center anchor, could we have a top anchor too? That would help to adjust for different sizes of targets without having to use branch logic.
That's what the Taget Child setting is there for, it allows you to use a child object of the target instead of the target. E.g. adding empty game objects for 'Head' or other parts you want to focus on.
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
The next update will add an option to ignore the scale in local space :)
Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found. If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
However in CameraPosition.Use() it moves the position as follows:
if(this.localSpace)
{
camera.position = target.TransformPoint(this.position);
}
else
{
camera.position = target.position + this.position;
}
And the unity manual states: https://docs.unity3d.com/ScriptReference/Transform.TransformPoint.html
So using local space it is working as designed. The issue is that if I am not using local space I don't know how to use the relative rotation of the target. For example I want to have the camera 10 units behind the target, but since the z axis is absolute in this case I cant just say z=-10.
I assume there's likely an easy way to do what I want here :)
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!