Answer by nikita68
first put the prefab into the scene. then make the script get observed in the inspector. then apply the changes to the prefab and destroy the object in the scene. After those steps the script should...
View ArticleAnswer by nikita68
Doesn't matter. Solved by making the gun a child of a different object.
View ArticleAnswer by nikita68
robertbu's comment contans the answer! "Sample Rigidbody.velocity.magnitude at some frequency and compare the numbers. Note you may have to average over several frames to smooth things out....
View ArticleAnswer by nikita68
//auto stabilise rotation, except for the mainParent.transform.rotation.y (because this is the right/left movement) float rotx = mainParent.transform.eulerAngles.x - transform.eulerAngles.x; float rotz...
View ArticleAnswer by nikita68
I know you asked for tutorials, but sometime you wont be able to program eveything yourself. If you need an AI solution you could use Shooter AI which handles everything for you. Also UFPS on the Asset...
View ArticleAnswer by nikita68
Method 1 is the best(easiest), but to make it even out, you should add a Random.Range factor, so that they don't check at the same time, but at individual cycles. Method 3 could be used if the number...
View ArticleAnswer by nikita68
It needs to be: public void Survival() { //your code } The "public" factor before the method shows Unity that the method can be called outside of that script.
View ArticleAnswer by nikita68
For anybody wondering, the best solution is to parent all objects under one rigidbody and use a script that measures an impact to simulate the breaking of a joint. Then when an object is broken off the...
View ArticleAnswer by nikita68
For all those wondering, the solution is quite simple: - Under Microphone.Devices, one of them is usually the output itself, which you can then directly apply to an audiosource The downside is that you...
View Article