quality-control/Assets/Scripts/ConveyorBelt.cs
2024-08-17 01:09:01 +02:00

28 lines
595 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ConveyorBelt : MonoBehaviour
{
public float speed = 1;
List<ContactPoint> contactPoints = new List<ContactPoint>();
private void OnCollisionStay(Collision collision)
{
Vector3 targetSpeed = speed * Vector3.forward;
Vector3 vel = collision.relativeVelocity;
int count = collision.GetContacts(contactPoints);
if (collision.rigidbody)
{
for (int i = 0; i < count; i++)
{
}
}
}
}