Quantcast
Channel: Answers by "Superrodan"
Browsing all 62 articles
Browse latest View live
↧

Answer by Superrodan

Ok, after finally figuring out what to search for I found an answer here: http://answers.unity3d.com/questions/623878/how-to-restart-mecanim-state-animation-or-play-it.html What I needed to do was...

View Article


Answer by Superrodan

This is just a guess, but do you have using UnityEngine.UI; At the top of your script? I know when I use Text elements I need that there, but I'm not sure you would need it for a GetComponent.

View Article


Answer by Superrodan

If the point you want to point towards is a rotation vector you can use RotateTowards, I believe. Quaternion myQuat = Quaternion.Euler(transform.localEulerAngles); Quaternion targetQuat =...

View Article

Answer by Superrodan

This may not be what you're looking for since it's a really simpl fix and I have no idea how experienced you are with unity, but did you by any chance switch to the hand tool at the top of your screen?...

View Article

Answer by Superrodan

You will likely need to use floats and the time functions in Unity to accomplish this. Something like this pseudocode solution should probably work. Replace "theTimerShouldBeGoingUp" with whatever...

View Article


Answer by Superrodan

I wouldn't recommend using physics for this since you don't want gravity, and you don't want the object to be movable. What you can do is create a script that just makes an object move in the way you...

View Article

Answer by Superrodan

Then this should be extremely simple. All you need to do is create a script that moves the object downwards every frame. Here is a quick and dirty example that uses a speed per second: public float...

View Article

Answer by Superrodan

I would create a list with them. I'm relatively new at lists and haven't used them much but I would try to do something like this: public int GetANumber() { List numbers = new List(); numbers.Add(1);...

View Article


Answer by Superrodan

After reading a bit more about Lerp it's not the halfway point so much as the point represented by the third variable in the parenthesis. It's only halfway if you put 0.5 in. Still, I still believe...

View Article


Answer by Superrodan

The way I handled this in my game was to in addition to my 2d array create separate public arrays for each layer. So for you it would be 7 different arrays of ten elements each. This allowed me to have...

View Article

Answer by Superrodan

The reference to change is ".text". For example: MessageCentreText.text = "this is my text"; Of course, that's only half of it. To make a button do that, you'd need to put it in a script. Something...

View Article

Answer by Superrodan

Audio.Stop does not affect it. I have found my problem and it was a mistake in my inspector. Two floating platforms' scripts were referencing the one I was trying to move. This had the result of both...

View Article

Answer by Superrodan

The second bracket is in the wrong spot. it should be after your if statement not before your if statement. Like this: void Awake() { if( Application.loadedLevelName == "Level 01") {...

View Article


Answer by Superrodan

If you call the don't destroy on load function on your music player, then it won't be destroyed when you switch between scenes. The only problem is that if you return to the scene where you started the...

View Article

Answer by Superrodan

Ok, so the answer was simple and I was WAY overthinking it. Instead of using a transparent background in photoshop I just needed a layer of white beneath the decal. Now it works perfectly and I can get...

View Article


Answer by Superrodan

The way to do this is to have a variable you store somewhere globally. I did this with a playerprefs variable so that if I turned off the game and came back it would remember the volume I wanted. So...

View Article

Answer by Superrodan

Warning: This is just a guess. I don't think you want to animate the ball but I'm also not sure making it into a physics object is the right approach either. Instead you probably want the ball to be...

View Article


Answer by Superrodan

This thread might help you: http://forum.unity3d.com/threads/dynamic-draw-order-or-2d-z-buffer.220231/ Specifically this post:...

View Article

Answer by Superrodan

I'm not 100 percent sure because I'm also a novice but I think the problem is that you have the parenthesis in there. Room is not a function so you do not need parenthesis. new Room()[roomDensity];...

View Article

Answer by Superrodan

For me the easiest way to accomplish this is with "Invoke". http://docs.unity3d.com/ScriptReference/MonoBehaviour.Invoke.html Put whatever you want to be delayed into its own function and then invoke...

View Article
Browsing all 62 articles
Browse latest View live


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