Skip to main content
Search our knowledge base

What is CS0131?

Comments

2 comments

  • Abou75

    what i write if the component is a C# script ?

    0
  • FcartovichDV

    help please with this code i can't get what should i do here (error is on 11,21)
    `

    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    public class Bullet : MonoBehaviour
    {
       public float offset;
       private float rotateZ;

       void Update()
       {
        Vector3 diference = Camera.main.ScreenToWorldPoint(Input.mousePosition) - transform.position;
        float rotateZ = Mathf.Atan2(diference.y, diference.x) = Mathf.Rad2Geg;
        transform.rotation = Quaternion.Euler(0f, 0f, rotateZ + offset);
       }




    }`
    0

Please sign in to leave a comment.