Skip to content

Instantly share code, notes, and snippets.

@AmmarTee
Created December 19, 2022 07:38
Show Gist options
  • Save AmmarTee/aabd070b49c8cf84c24754717722b583 to your computer and use it in GitHub Desktop.
Save AmmarTee/aabd070b49c8cf84c24754717722b583 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class addVelocity : MonoBehaviour
{
// Start is called before the first frame update
public float force;
// Update is called once per frame
void Update()
{
this.transform.position = new Vector3(this.transform.position.x,this.transform.position.y,this.transform.position.z+force);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment