| 438 | } |
| 439 | |
| 440 | void ObjCamera(ItemInfo* camSlotId, int camMeshId, ItemInfo* targetItem, int targetMeshId, bool cond) |
| 441 | { |
| 442 | if (ItemCameraOn != cond) |
| 443 | Camera.DisableInterpolation = true; |
| 444 | |
| 445 | //camSlotId and targetItem stay the same object until I know how to expand targetItem to another object. |
| 446 | //activates code below -> void CalculateCamera(). |
| 447 | ItemCameraOn = cond; |
| 448 | |
| 449 | UpdateCameraElevation(); |
| 450 | |
| 451 | //get mesh 0 coordinates. |
| 452 | auto pos = GetJointPosition(camSlotId, camMeshId, Vector3i::Zero); |
| 453 | auto dest = Vector3(pos.x, pos.y, pos.z); |
| 454 | |
| 455 | GameVector from = GameVector(dest, camSlotId->RoomNumber); |
| 456 | Camera.fixedCamera = true; |
| 457 | |
| 458 | MoveObjCamera(&from, camSlotId, camMeshId, targetItem, targetMeshId); |
| 459 | Camera.timer = NO_VALUE; |
| 460 | Camera.speed = 1; |
| 461 | } |
| 462 | |
| 463 | void ClearObjCamera() |
| 464 | { |
no test coverage detected