mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
actor:GetCameraPivotHeight(distance) gives the height the world's follow camera eases to for a unit, read from the actor's model as CCamera::BuildPivotHeights (0x0050CA90) reads a unit's. The camera's target setter (0x0050D0F0) rebuilds the presets every frame once the model has loaded, so the actor's are read at each call: - base: the unposed offset of attachment 17 (GetAttachmentOffset 0x00712CF0) plus 7/72 yard (0x00808AB0), or 0.9 (0x00804588) of the collision box (0x00713700), times the scale; - near: lowered by the stand-state animation's sequence bounds top under Stand's (0x0050CDDF on); - swimming: lowered the same way by Swim (42) when the model has both (0x0050CCE3 on); - each kept from 5/6 (0x008089CC) to 15 (0x008089C8). ArmPivotHeight (0x0050F880) picks swimming for a swimmer, else near under 1.8315 yards of target distance (0x008089B0), else far. The constants are read live. An actor has no stand state: the animation it plays stands in when it is one the jump table at 0x0050D0CC gives, and cameraHeightIgnoreStandState (its CVar* at 0x00BE0CF4, stored at 0x0050BD9E) ignores it. A mount is left out. Until the model has loaded the method returns nothing and the camera waits, as the world's update does (0x0050E900). FollowCamera drops its height argument and eases to that height as the camera's height channel does: the first one is taken at once (BeginHeightTransition 0x00512790), each new one is armed (ArmHeight 0x005126B0) for |change| / cameraHeightSmoothSpeed seconds and eased with the cosine curve of 0x0050F160. M2 gains HasAnimation, GetCollisionBox and GetAttachmentOffset wrappers; SceneSpell and SceneWorld use them in place of their local function pointers.