- Home /
FPS Tutorial 1-What do I drop "Explosion" onto in the inspector window for the "Missile"
Okay, I can not figure out where to drag and drop the "Explosion" prefab in the inspector window of the "Missile". From page 12. There does not seem to be any place that will allow me to place the Explosion on to.So... Where is the Missile explosion Variable ?
Nowwecanassigntheexplosiontothemissile: EnsuringthatMissileprefabisselected,fillintheExplosionvariablebydragging theExplosionobjectintheProjectpanelontotheMissilesExplosionvariablein theInspectorpanel. Please tell me what I am missing! Thanks
Answer by dhendrix · Apr 17, 2010 at 03:46 AM
I've never followed the tutorial, but I'm assuming it would be a user created variable in the script component of the Missile prefab.
Answer by vincent 2 · Jan 23, 2011 at 09:38 AM
i am having the exact same problem... i did the code correctly... as far as i can see but the explotion variable slot will not show up
var explosion : GameObject;
function OnCollisionEnter( collision : Collision ) { var contact : ContactPoint = collision.contacts[0];
var rotation = Quaternion.FromToRotation( Vecter3.up, contact.normal ); var instantiatedExplosion : GameObject = Instantiate( explosion, contact.point, rotation );
Destroy( gameObject );
}
Answer by nbatothemax · Jun 22, 2012 at 05:45 PM
the problem for me was that i had to go to component -> scripts -> projectile when i had missile prefab selected. This added a projectile script with an explosion variable that was empty. Then I was able to drag in the explosion prefab. Hopefully that helps.
Your answer
Follow this Question
Related Questions
Calling a variable 2 Answers
lookAt on Y axis only 1 Answer
Speedometer Error. PLS help ((( 0 Answers
Cast a variable over intentiated gameObjects 0 Answers
Linking Variable Values 1 Answer