Quantcast
Channel: Answers by "M-G-Production"
Browsing latest articles
Browse All 52 View Live

Answer by M-G-Production

Hi deeds0l! Hmmmmmm... You don't seem to want to set the Transform.Position of an GameObject, but a RectTransform Component... It's quite different... Try replacing Vector3.zero with "new...

View Article



Answer by M-G-Production

You should play with **Arrays**! Arrays are "Tables" that contents severals and different gameobjects or any other var. So, let's say this: **public GameObject[] hazard;** By adding "[]" you simply...

View Article

Answer by M-G-Production

Hi Edyvargas! **First: ** I really think you should create individuals animations for what you are trying to do here. When this will be done, set your Running propellers animation to Clampforever mode...

View Article

Answer by M-G-Production

Hey taxvi! Thanks showing interest in helping me, I **really** appreciate! But I think found the problem! I created a prefab with my controller in my assets folder and I think my script looked for it...

View Article

Answer by M-G-Production

Hi gonzalo rivero! theCar.transform.position will give you a Vector3 variable (Vector3 are 3 floats stored in a single var. Ex (x,y,z)) theCar.transform.eulerAngles will give you another Vector3...

View Article


Answer by M-G-Production

Hi JonWag! Create a square in an image editor and export it in png/jpeg (size doesn't really matter). Click on your particle system, in the inspector, go in the "Particle System" tab and then the...

View Article

Answer by M-G-Production

Hi elpuerco63! Perhaps you could do so: **this.DontDestroyOnLoad()** (you could change "this" with gameObject or whatever you want! "This" refers to the actual script) (Read about it:...

View Article

Answer by M-G-Production

Hi .black! Try this! Store the parent in another **Transform** variable! public Transform daVodaParent; public Rigidbody daVoda; void Start() { //You don't need to set daVoda to null!! Already the...

View Article


Answer by M-G-Production

Hi DarkSlash! When you say move to "0,-2,0", you set absolute values wich are relative to the scene "grid". In your case, you must make it relative to the object! **So There it is in C#:**...

View Article


Answer by M-G-Production

Hi mazket! Are you trying to acces a **Script Component** named "Button" or an **GameObject**? **If Button is an object:** using UnityEngine; using System.Collections; public class Cooldown :...

View Article

Answer by M-G-Production

**I formatted your code, and there is nothing here about Jumping :S** var walkSpeed: float = 7; // regular speed var crchSpeed: float = 3; // crouching speed var runSpeed: float = 20; // run speed...

View Article

Answer by M-G-Production

So here it is vultt3rim! There is plenty of way to do it, but now I'll show you mine! I made it simple with bunch of comments to see what's actually going on! So this C# system will instantly work and...

View Article

Answer by M-G-Production

## Hi soulburner ## ---------- Personal Indie tips! ---------- **First**, look for tutorials about simple animations on Unity3D. It will help you! **1 - If you need some complex cut scenes wich...

View Article


Answer by M-G-Production

**Salut Isador34!** Je suis passé par le même problème... So to display an EnumPopup on your custom inspector, put this line of code in your OnInspectorGUI() function: //Look for the Enum...

View Article

Answer by M-G-Production

This would be the most simple way to do it Create a C# script, name it '**FadeOut**' and then drag it on your logo gameObject. Then copy/paste the code and tweak it. using System.Collections; using...

View Article


Answer by M-G-Production

There are lots of ways to do it! If you want to do it like Button component, Look for **UnityEvents**. Example: using System.Collections; using System.Collections.Generic; using UnityEngine; using...

View Article

Answer by M-G-Production

I would probably look like that: y = Mathf.Sqrt(Mathf.Pow(a, 3)/u) * (x - n * Mathf.Sin(x))

View Article


Answer by M-G-Production

I suppose you simply flip the SpriteRenderer and you work with gravityScale (from Rigidbody2D)? If so, let's make it super simple then. public SpriteRenderer mySprite; public Rigidbody2D myR; public...

View Article

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 latest articles
Browse All 52 View Live




Latest Images