Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class TapMoving : MonoBehaviour
{
public Camera cam;
public Variables variables;
public Vector2 vector2;
public Vector2 playerVector;
public GameObject objectThis;
public void Tap(InputAction.CallbackContext context)
{
Debug.Log(Mouse.current.position.x.ReadValue());
objectThis.transform.position = cam.ScreenToWorldPoint (new Vector3(Mouse.current.position.x.ReadValue(), Mouse.current.position.y.ReadValue(), 1));
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question