How can I rotate a gameobject with mouse drag? (I want to rotation along Y axis only )
I have search many example like this:
but they only work when drag bellow of the gameobject like this.
if I drag top of the gameobject that will cause wrong rotate direction
How can I fix / achieve it?
if I drag top of the gameobject that will cause wrong rotate direction How can I fix / achieve it?
Possible answer for this part:
If you’re using a script that includes something like
transform.Rotate (Vector3.back, ( Speed * Time.deltaTime))
you would use Vector3.forward instead of back. It may be Vector2 or Vector4 for your purposes.
“Speed” is public float value in this case.