Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using simul;
- public class CamStormMove : MonoBehaviour
- {
- public Vector3 StrikeStart;
- public Vector3 StrikeEnd;
- private void Update()
- {
- // Spawn a strike at the cloud base strike must be where there is cloud, otherwise
- // the strike won't be rendered
- var ts = trueSKY.GetTrueSky();
- StrikeStart.y = ((float)ts.GetKeyframeValue(ts.GetInterpolatedCloudKeyframe(0), "cloudBase")) * 1000.0f;
- StrikeStart.y += 400.0f;
- if (Input.GetKeyDown(KeyCode.Tab))
- {
- ts.SpawnStrike(StrikeStart, StrikeEnd);
- }
- }
- private void OnDrawGizmos()
- {
- // Get current strike and draw a sphere at endpos
- var ts = trueSKY.GetTrueSky();
- var strike = ts.GetCurrentStrike();
- if(strike.id != 0)
- {
- Gizmos.color = Color.red;
- Gizmos.DrawSphere(new Vector3(strike.endpos.x, strike.endpos.y, strike.endpos.z), 500.0f);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement