Quantcast
Channel: Answers by "ThePersister"
Browsing all 99 articles
Browse latest View live
↧

Answer by ThePersister

Well, you could have the game technically start already (Load the scene), but have there be a loading screen viewed to the player. In an IEnumerator you can instantiate the objects with small delays...

View Article


Answer by ThePersister

Jeric Miana was right, please accept an answer to close this question :) You have 2 Options: - Change the name of the script in code to "MoveMousePlayer" instead of "MovePlayer" - Change the name of...

View Article


Answer by ThePersister

Hmmm, tough one. If you'd like to track down your perfomance issues, I'd suggest using the Unity Profiler, look up some tutorials on Youtube, etc. Once you get the hang of the profiler, you can track...

View Article

Answer by ThePersister

Well, you can do it like this, follow the tutorial: https://www.youtube.com/watch?v=VwgDfVs8TNI Or if you want to have another go at NGUI, try this tutorial, it has less audio, but a clear result:...

View Article

Answer by ThePersister

Ok, this one is reasonably tough. If I understand correctly, you're trying to get the "GridPositions" of each block between Green Marker 1 and Red Marker 2. So, for example, if you have: - Green Marker...

View Article


Answer by ThePersister

Oh, this was actually a lot easier than I expected, haha. If you want to rotate as long a you have your MouseButtonDown, then, instead of using "GetMouseButtonDown(0)" (which only calls once per click)...

View Article

Answer by ThePersister

It's hard to guess the details of your collision from only the scene views, so maybe more details would help. One thing you should know is that marking a Collider as "Trigger" will have it ignore...

View Article

Answer by ThePersister

I'll give a shot at answering this question, but if I get it wrong, please add images of your scene and add your code, which would give us better insight of the situation. One thing you should know is...

View Article


Answer by ThePersister

Not sure what you mean with that, but you can definitely use OnMouseDown to activate something when "clicked" [http://docs.unity3d.com/ScriptReference/MonoBehaviour.OnMouseDown.html][1] If you mean you...

View Article


Answer by ThePersister

Instead of adding the code below to the bullet: if(otherObject.name == "Boss") { Destroy(otherObject.gameObject); } You should make a Boss script, or if you already have a Boss script attached to the...

View Article

Answer by ThePersister

I've made this script that gets a normalized Direction towards the mouse. It does this based on your ViewPort, Just give it a shot and play around with it. using UnityEngine; using System.Collections;...

View Article

Answer by ThePersister

That's perfectly fine for as far as I know, just be careful with using .transform in Updates. You probably know GetComponent() is heavier on the system than things with variables, right? Well,...

View Article

Answer by ThePersister

You could do all that, or just use Phsysic Materials and put them in the colliders of the Terrain. In a Physic Material, you can define the amount of friction applied to object sliding across the...

View Article


Answer by ThePersister

Haha, easy one, we'll solve this in a fraction of time :3 You used to define a: float timer = 0; In the ninjaKite() method, which in turn was called very often, to up the timer, which is logical,...

View Article

Answer by ThePersister

Hey There, PvTGreg, (no offense) don't mind the 1st answer, it's not really giving you what you want. Eric the legend says you can't:...

View Article


Answer by ThePersister

Quaternions contain values between 0 and 1, therefore, if you set 90, 180, 270 or 0 in them directly, it'll go all drunk on you. Instead, use EulerAngles for setting absolute values: // Store Transform...

View Article

Answer by ThePersister

That's the expected behaviour, this post is very relative, you'll find the answers you need there I suppose :)...

View Article


Answer by ThePersister

Overhead usually indicates the usage of CPU required to keep your scene up and running smoothly whilst running the rest of your code. Try closing the scene view whilt you Run / Profile and see if you...

View Article

Answer by ThePersister

I tried running this exact script in a simple working scene and it works just fine: using UnityEngine; using System.Collections; public class SomeScript : MonoBehaviour { private Vector3 []...

View Article

Answer by ThePersister

Using a LayerMask is your best way out of this one. As mentioned before but not replied to yet. I quote:> *I tried using the separate layer, and*> *it didn`t work.*>> *If I use this, will...

View Article
Browsing all 99 articles
Browse latest View live


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