I’m using a FollowCamera
with lockedTarget
set to the player’s mesh. But the mesh’s origin is at his feet, so when the camera zooms in, it’s looking at the floor… I would prefer it look over the shoulder. The camera’s heightOffset
property changes the camera’s position, but not where it’s looking. We need something like a “targetOffset” property, so I tried adding one:
followCamera.js (v5.7.0):
86: _this.lockedTargetOffset = Vector3.Zero();
...
93: FollowCamera.prototype._follow = function (cameraTarget) {
...
101: var targetPosition = cameraTarget.getAbsolutePosition();
...
120: this.setTarget(targetPosition.add(this.lockedTargetOffset));
Seems logical enough, but it has no effect. I can see the code changes in the Chrome inspector, and setTarget
does receive the updated vector, but the camera’s rotation doesn’t change. Can someone please point me in the right direction? I’d be happy to submit a PR. Thanks.