Answer by M-G-Production
First: Your player GameObject and your health sprite GameObject must both have a collider 2D. The Health Collider2D must be set as Trigger. Then in your health object, Add a script with these lines of...
View ArticleAnswer by M-G-Production
Hey Bud! First you need to know that Transform.Position is not the same as your camera bounds! So you simply need to convert your sprite world position to a screen position. I did it for you! If it...
View ArticleAnswer by M-G-Production
There are no needs of doing that in loops my friend! And think about it, you have a foreach loop in a do loop! Really bad idea! There are tons of ways to have the same result without loops :) Show me...
View ArticleAnswer by M-G-Production
**Wow... You gave me a hard time with this!** I managed to find a way of doing this, but you will need to use List instead of Array. *(Don't worry, Lists are better!! )* Let me explain you the thing a...
View ArticleAnswer by M-G-Production
**Of course it's possible!** So I guess that your goal is: When the player enters a trigger, a certain object would teleport itself to another location? There are tons of ways to do this! first you'll...
View ArticleAnswer by M-G-Production
Hey Bud! The problem is that your **rigTransform remains null**... It tries to access it's parent and it looks like it doesn't have one! So Unity throws an error... I think you wan't your Camera to...
View ArticleAnswer by M-G-Production
It looks like minEmission is now deprecated... Perhaps this could help? [ParticleSystem.emission][1] [1]: https://docs.unity3d.com/ScriptReference/ParticleSystem-emission.html
View ArticleAnswer by M-G-Production
ParticleSystem.MainModule main = GetComponent().main; main.loop = true; This way, you store the main module in a variable. EDIT: In your case: ParticleSystem.MainModule = thrustsParticles [i].main;...
View ArticleAnswer by M-G-Production
The problem is... When you destroy your gameObject, the script can no longer be executed... Here: IEnumerator Poof() { yield return new WaitForSeconds(Seconds); Destroy(gameObject); //THIS LINE!! }...
View ArticleAnswer by M-G-Production
Hi! Do you have a Physic Material on your Rigidbody 2D? I'm actually using lots of Edge Colliders in my project and never had this issue!... Exept while using one of my created Rigidbody Material.
View ArticleAnswer by M-G-Production
First you should consider storing that 'wall' into a local variable to increase performance. Then you should use position instead of localPosition (position is the real world position, localPosition is...
View ArticleAnswer by M-G-Production
Hi Budd! I had the same problem. Be sure to gameObject.SetActive(true) your Tank Game Object before trying to start a coroutine located in a script attached to it!
View Article