This function is called every fixed framerate frame, if the MonoBehaviour is enabled.
// Apply a upwards force to the rigid body every frame function FixedUpdate () { rigidbody.AddForce (Vector3.up); }
using UnityEngine; using System.Collections; public class Example : MonoBehaviour { void FixedUpdate() { rigidbody.AddForce(Vector3.up); } }
import UnityEngine import System.Collections public class Example(MonoBehaviour): def FixedUpdate() as void: rigidbody.AddForce(Vector3.up)