コード例 #1
0
 private void FixedUpdate()
 {
     //Object is given force, affected by gravity and windspeed
     rb.AddForce(new Vector3(-speed + shoot.GetVectorWind().x, 0 + (Physics.gravity.y * 0.1f), 0.01f * shoot.GetVectorWind().z), ForceMode.Force); //Object is given force, affected by gravity and windspeed.
 }
コード例 #2
0
ファイル: Windicator.cs プロジェクト: JoriKos/Shootin
 private void Update()
 {
     rotation = Quaternion.Euler(shoot.GetVectorWind());
     this.gameObject.transform.rotation = rotation;
 }