Is there a way to AddForce to a spawned object using button by using it rigidbody ?

Updated on June 2, 2017 in Discussions
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
1 on June 2, 2017

So i tried to use this line of code

 previousSpawnedGameObject[0].rigidbody.AddForce ??? //previousSpawnedGameObject is a list storing gameobject
 

I want to take that object rigidbody and add a constant force to it but i dont see there is AddForce function ?Any idea ? Im realling new to unity .Thanks for the help
And also i tried to assign the object prefab rigidbody to the scripts but still doesnt work

  • Liked by
Reply
0 on June 2, 2017

If I understand want you are asking this tutorial should help.

 

  • Liked by
Reply
Cancel