20 lines
419 B
C#
20 lines
419 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class moveup : MonoBehaviour
|
|
{
|
|
private Rigidbody rb;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
rb = GetComponent<Rigidbody>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
rb.MovePosition(transform.position + new Vector3(0,1,0)*Time.deltaTime);
|
|
}
|
|
}
|