Answer by Ericool
for movement I suggest you to create a coroutine , in this coroutine that updates each seconds for instance , you increment a float like float ForceMagnitude , then in the update method , enter this...
View ArticleAnswer by Ericool
If you plan to do networking , like every games each client needs to download the application . The application will contain a Network component where you can distribute sockets . Make sure to create a...
View ArticleAnswer by Ericool
If you simply dont need the parent sometime , keep the reference and set child transform.parent to null , then when you need it back set it to the reference you kept. Hope that help
View ArticleAnswer by Ericool
http://www.moddb.com/tutorials/unity3d-creation-of-touch-input-mobile But look at Asset Store if there is something already done for you
View ArticleAnswer by Ericool
make sure that target is never null otherwise that functionnality must be disabled . What you can do is calling a coroutine for each bullet instantiated , that coroutine is simply lookat(target) at...
View ArticleAnswer by Ericool
what I am wondering is if you can really change the mesh by cutting the worm mesh in two . If so , then what you can try is that when you are slicing the worm you are creating a vector , what is on the...
View ArticleAnswer by Ericool
make sure howMany is smaller than or equal to 9 array is of size 9 but no init for index 6,7,8 . Then you clear that unadress index ? check that by simply allocating a array of 7 and clearing an array...
View ArticleAnswer by Ericool
You can use polymorphism and encapsulation like so : public class PieceOfShip : MonoBehaviour { virtual void update(){return;} virtual void render(){return;} } public class Gun : PieceOfShip { override...
View ArticleAnswer by Ericool
The thing is that you can enable or disable any component at any time , that means that if you are not shooting or whatever , none is enabled , but if you are , then the approximate region of where the...
View ArticleAnswer by Ericool
OnTriggerStay is not recommended actualy , in my opinion . You should set a bool to true if OnTriggerEnter() is called and set it false when OnTriggerExit() is called . Then in a coroutine or in...
View ArticleAnswer by Ericool
The issue seems to be coming from ambiant lighting perhaps. You can configure in your scripts scene attributes such as ambiant lighting and LOD , number of rays , etc. Try RenderSettings and...
View ArticleAnswer by Ericool
the easiest thing would be to translate the camera with a script using a certain speed and a box collider with the player to stop moving if OnTriggerEnter .
View ArticleAnswer by Ericool
put them all in a static array within a script that is init but not updated , create a method to return the ref w/ param an index . But the simpliest solution is to design your architecture first ....
View ArticleAnswer by Ericool
when working with physic use vector instead of float there is already plenty of method and operator overload for you . Then you can simply * two vectors or call normalize() or simply calculate the sum...
View ArticleAnswer by Ericool
GetComponent(); or GetComponent("PlayerFisica"); also make sure it is not null if(playerFisica) { //.... } if your script does not contain Move creates it , or maybe the name is wrong or you simply put...
View ArticleAnswer by Ericool
well using OnTriggerEnter and RayCast are two differents techniques first off . If we enter in OnTriggerEnter that means that isTrigger is enable , check that first . Second , OnTriggerEnter works once...
View ArticleAnswer by Ericool
when you are playing with the editor, it loads your public prefabs or scripts so there is no worry with that , but a good practice is to load them , even other resources and when needed you copy them ....
View ArticleAnswer by Ericool
the script should go at the parent (Object1) , then this one fix its rotation whatever and fix a specific or all child localRotation. Because is it the knife who decide or the knight ?
View Article