Hello, i want to make a aiming system like war thunder. I search to make system who cursor is overlaping Like this vidéo : I already make a script for rotation but i don't now how make cursor system. Code (CSharp): ector3 direction = Camera.main.ScreenToWorldPoint(new Vector3(Input.mousePosition.x, Input.mousePosition.y, Input.mousePosition.z) - transform.position); Quaternion rotation = Quaternion.LookRotation(direction); transform.rotation = Quaternion.Lerp(transform.rotation, rotation, shipTurnSpeed * Time.deltaTime);
The outer ring is were you wanna go and the inner one syncs to the actual plane. Nothing fancy going on
A screen space UI, get the two positions using https://docs.unity3d.com/ScriptReference/Camera.WorldToScreenPoint.html