Camera's location and setFrame()

I just noticed that in the setFrame() methods of the Camera class (lines 912 and 968) we have this:

    this.location = location;

instead of this:

    this.location.set(location);

Is that a bug or a feature? Can I trust this behavior to set the camera’s location to a new Vector3f?

1 Like

My guess is that it’s an oversight on someone’s part… ie: a bug.

Unfortunately, it’s also the kind of thing that someone might be incorrectly relying on so it would be a potentially “breaking change” to fix it in a point-release.

I wouldn’t rely on the sharing. None of the other parameters are shared and I believe I’d be 100% surprised if I’d discovered the sharing by accident.

So I vote: it’s a bug.

4 Likes