- Home /
 
              This question was 
             closed Dec 21, 2014 at 09:55 AM by 
             Graham-Dunnett for the following reason: 
             
 
            Duplicate Question
 
               Question by 
               Strogg2313 · Dec 21, 2014 at 09:54 AM · 
                erroroperator  
              
 
              error CS0019: Operator `>' cannot be applied to operands of type `UnityEngine.Vector3' and `int'
Hello everyone!I am troubled with a script i get an error message error CS0019: Operator >' cannot be applied to operands of type UnityEngine.Vector3' and `int' Here is the script!Please help me!It is C#
using UnityEngine; using System.Collections;
public class AirWing : MonoBehaviour {
 public GameObject    Wing;
 public GameObject CarObject;
 void Start(){
     Wing.SetActive(false);
     Update();
 }
 
               void Update(){
     if(CarObject.rigidbody.velocity > 1){
         Wing.SetActive(true);
     }
 }
 
               }
               Comment
              
 
               
              Try 1.0f ins$$anonymous$$d of 1 for a float.
Anyway, velocity is a Vector3 (as it's directional), which is three floats.
What you are doing is attempting to use the Scalar (which in this case is the $$anonymous$$agnitude)
Follow this Question
Related Questions
A node in a childnode? 1 Answer
BCE0044 unexpected char: 0xFEFF 2 Answers
£ Symbol won't work on Mac? 0 Answers
How to Fix Compilier Errors? 0 Answers
WaitForSeconds... 2 Answers