Fix bug in Basis [] operator and add missing Transform-Vector3 * operator

The [] operator of Basis was returning a reference to a temporary, so fixed it.
There was no * operator in Transform equivalent to the xform function, which is
not in line with GDScript behavior.

Also fixed remaining cases where Transform relied on the old behavior of the
[] operator of Basis (i.e. that it returns the row, not the column).
This commit is contained in:
Daniel Rakos
2019-04-11 17:06:02 +02:00
parent f0fe88bd36
commit 4be7fcdde5
3 changed files with 12 additions and 5 deletions

View File

@@ -307,7 +307,7 @@ public:
Basis();
const Vector3 &operator[](int axis) const {
const Vector3 operator[](int axis) const {
return get_axis(axis);
}