- Home /
Question by
abhay80413 · Jun 10, 2020 at 09:12 PM ·
uitransformbuttons
tranform.rotation not working with ui buttons
public void OnPointerEnterRight(){ // this is working --> // rb.AddForce(lr *Time.deltaTime,0,0,ForceMode.VelocityChange );
float tiltAroundZ = CrossPlatformInputManager.GetAxis("Horizontal") tiltAngle; float tiltAroundX = CrossPlatformInputManager.GetAxis("Vertical") tiltAngle; Quaternion target = Quaternion.Euler(tiltAroundX, 0, tiltAroundZ); transform.rotation = Quaternion.Slerp(transform.rotation, target, Time.deltaTime * smooth); // <------this is not working plz help
Comment