- Home /
This question was
closed Oct 18, 2014 at 04:36 PM by
Graham-Dunnett for the following reason:
Duplicate Question - http://answers.unity3d.com/questions/topics/bce0023.html
Why do i get this error
this is the error Assets/MelleSystem.js(10,86): BCE0023: No appropriate version of 'UnityEngine.Transform.TransformDirection' for the argument list '(UnityEngine.Vector3, UnityEngine.RaycastHit)' was found.
#pragma strict
var TheDamage : int = 50;
var Distance : float;
function Update ()
{
if (Input.GetButtonDown("Fire1"))
{
var hit : RaycastHit;
if (Physics.Raycast (transform.position, transform.TransformDirection(Vector3.forward, hit)));
{
Distance = hit.distance;
hit.transform.SendMessage("ApplyDamage", TheDamage, SendMessageOptions.DontRequireReceiver);
}
}
}
Comment
Follow this Question
Related Questions
Instantiate GameObjects, brings an error to the log... 2 Answers
AI Turret Targeting System 2 Answers
Problem instantiating a prefab with static typing 1 Answer
AudioClip won't play?? 0 Answers