Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class PickUp : MonoBehaviour {
- public Transform target;
- void Update () {
- }
- void onMouseDown() {
- this.transform.position = target.position;
- this.transform.parent = GameObject.Find ("FirstPersonCharacter").transform;
- }
- void onMouseUp() {
- this.transform.parent = null;
- }
- }
Add Comment
Please, Sign In to add comment