お好みのスクリプト言語を選択すると、サンプルコードがその言語で表示されます。
Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.
CloseGet the world-space speed of the camera (Read Only).
This camera's motion in units per second as it was during the last frame.
function Update () { print ("Camera moving at " + camera.velocity.magnitude + " m/s"); }
using UnityEngine; using System.Collections; public class ExampleClass : MonoBehaviour { void Update() { print("Camera moving at " + camera.velocity.magnitude + " m/s"); } }
import UnityEngine import System.Collections public class ExampleClass(MonoBehaviour): def Update() as void: print((('Camera moving at ' + camera.velocity.magnitude) + ' m/s'))