using UnityEngine;
public class MotherBoardPlace : MonoBehaviour
{
private void OnCollisionEnter(Collision collision)
{
switch(collision.collider.tag)
{
case "Processor":
collision.rigidbody.isKinematic = true;
collision.rigidbody.detectCollisions = false;
collision.rigidbody.useGravity = false;
collision.transform.parent = transform;
collision.transform.eulerAngles = new Vector3(0, 0, 0);
collision.transform.localPosition = transform.Find("ProcessorPlace").localPosition;
break;
case "ram":
collision.rigidbody.isKinematic = true;
collision.rigidbody.detectCollisions = false;
collision.rigidbody.useGravity = false;
collision.transform.parent = transform;
collision.transform.eulerAngles = new Vector3(-90, 0, 90);
collision.transform.localPosition = transform.Find("RamPlace").localPosition;
break;
}
}
}