This commit is contained in:
2026-01-05 23:43:45 +05:00
commit 3d3b8dd134
2 changed files with 297 additions and 0 deletions

55
README.md Normal file
View File

@@ -0,0 +1,55 @@
### Usage Example
```
local playerVob = Vob(getPlayerPtr(heroId))
Camera.modeChangeEnabled = false
Camera.movementEnabled = false
setTargetVob(playerVob)
// or you can specify node
setTargetVob(playerVob, "BIP01 HEAD")
```
### API
```
// Public API
function isContolsDisabled() { return isContolsDisabled }
function getTargetVob() { return targetVob }
function getTargetNode() { return targetNode }
function getXAxisSensitivity() { return yawSpeed }
function getYAxisSensitivity() { return pitchSpeed }
function getZoomSensitivity() { return zoomSpeed }
function isYAxisInverted() { return isPitchInverted }
function getMinDistance() { return minDistance }
function getMaxDistance() { return maxDistance }
function getCurrentDistance() { return distance }
function setTargetVob(vob, node = "") {
targetVob = vob
targetNode = node
targetVobMatrix = targetVob.getTrafoModelNodeToWorld(targetNode)
currentMatrix = Camera.targetVob.matrix
currentVisualAlpha = targetVob.visualAlpha
maxVisualAlpha = currentVisualAlpha
}
function setControlsDisabled(value) { isControlsDisabled = value }
function setXAxisSensitivity(value) { yawSpeed = value }
function setYAxisSensitivity(value) { pitchSpeed = value }
function setZoomSensitivity(value) { zoomSpeed = value }
function setYAxisInverted(value) { isPitchInverted = value }
function setMinDistance(value) { minDistance = clamp(value, value, maxDistance) }
function setMaxDistance(value) { maxDistance = clamp(value, minDistance, value) }
```