Skip to content

Instantly share code, notes, and snippets.

@todorok1
Created April 11, 2018 07:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save todorok1/fd191e7ba38830504b030f7e39ad7382 to your computer and use it in GitHub Desktop.
Unityチュートリアル・角度計算のスクリプト。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SphereBooster : MonoBehaviour {
// 加える力の大きさ
[SerializeField]
float forceMagnitude = 10.0f;
// X軸からの角度
[SerializeField]
float forceAngle = 45.0f;
// 力を加える方向
Vector3 forceDirection = new Vector3(1.0f, 1.0f, 0f);
// イカ、省略
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment