public void Follow(CameraFollowEvent e, CameraTargetNode cameraTargetNode, [JoinByTank] TankNode tank, [JoinAll] CameraNode cameraNode, [JoinAll] Optional <SingleNode <FollowCameraComponent> > followCameraOptionalNode) { CameraTransformDataComponent cameraTransformData = cameraNode.cameraTransformData; CameraOffsetConfigComponent cameraOffsetConfig = cameraNode.cameraOffsetConfig; Vector3 cameraOffset = new Vector3(cameraOffsetConfig.XOffset, cameraOffsetConfig.YOffset, cameraOffsetConfig.ZOffset); BezierPosition bezierPosition = cameraNode.bezierPosition.BezierPosition; cameraTransformData.Data = CameraPositionCalculator.GetTargetFollowCameraTransformData(cameraTargetNode.cameraTarget.TargetObject.transform, tank.baseRenderer, tank.tankColliders.BoundsCollider.bounds.center, bezierPosition, cameraOffset); cameraNode.cameraRootTransform.Root.SetPositionSafe(cameraTransformData.Data.Position); cameraNode.cameraRootTransform.Root.SetRotationSafe(cameraTransformData.Data.Rotation); }
public void OnGameEvent(CameraFollowEvent gameEvent) { FollowPlayer(); }
public void Follow(CameraFollowEvent e, SingleNode <WeaponInstanceComponent> weapon, [JoinAll] SmoothingCameraNode battleCamera) { battleCamera.transformTimeSmoothingData.LastPosition = battleCamera.cameraRootTransform.Root.position; battleCamera.transformTimeSmoothingData.LastRotation = battleCamera.cameraRootTransform.Root.rotation; }