I’m trying to archive to shoot a proyectile based on the Mouse Movement (not related to the world, so no raycasts
How can I make it so that my mouse position gets converted into a float_>?? I looked into mousedrag, but frankly i havent gotten it after alot of googling.
if(Input.GetKey(KeyCode.V)){
var dragAmount : Vector3;
Debug.Log("Aim and shot");
if(Input.GetMouseButtonDown(0)){
firstPosit = Input.mousePosition;
}
if(Input.GetMouseButtonUp(0)){
lastPosit = Input.mousePosition;
}
dragAmount = lastPosit-firstPosit;
Convert dragAmount into a float???
Debug.Log( "delta X : " + lastPosit.x);
Debug.Log( "delta Y : " + lastPosit.y);
thanks guys.