Quantcast
Channel: Answers by "M-G-Production"
Browsing all 52 articles
Browse latest View live
↧

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 Article


Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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 Article


Answer 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 Article


Answer 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 Article

Answer 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 Article

Answer 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
Browsing all 52 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>