what im trying to do is spawn a bullet hole gameobject where the rocket hits, and i get this error.
Assets/Assets/WeaponScripts/Rocket.js(19,47): BCE0023: No appropriate version of ‘UnityEngine.Object.Instantiate’ for the argument list ‘(UnityEngine.GameObject, UnityEngine.ContactPoint, UnityEngine.Quaternion)’ was found.
ContactPoint.point is listed as a Vector3, so it’s easy to be confused.
You’d think that ContactPoint.point as Vector3 should fit this override:
static function Instantiate (original : Object, position : Vector3, rotation : Quaternion) : Object
And it does!
Knowing that it IS possible to use ContactPoint.point, and I assume, your explosion works fine, what’s the difference between the two lines of code?
Let’s put them side by side:
Instantiate (explosion, contact.point, rotation);
Instantiate (bulletHole, contact, rotation);
Simple oversight!
More eyes are good sometimes… It’s how best to solve Monkey Island. Keg of Beer, Bag of Pretzels, Many Eyeballs and Many Brains!