In relation to the https://developer.playcanvas.com/en/tutorials/orbit-camera/ tutorial, and in general, I need to make the camera start with a custom distance. For now the example is set to use the distanceMax, and not the distanceMin (or somewhere in between).
I have tried to alter the following lines:
- within
OrbitCamera.prototype.initialize = function () {
this distance line:
this._distance = 0;
- altered to; this._distance = 0.7;
- and within:
OrbitCamera.prototype._clampDistance = function (distance) {
if (this.distanceMax > 0) {
return pc.math.clamp(distance, this.distanceMin, this.distanceMax);
} else {
return Math.max(distance, this.distanceMin);
}
};
… altered to:
OrbitCamera.prototype._clampDistance = function (distance) {
if (this.distanceMin < 0) {
return pc.math.clamp(distance, this.distanceMin, this.distanceMax);
} else {
return Math.min(distance, this.distanceMin);
}
};
Without luck - code does parse, but no difference at launch.