Quantcast
Channel: Answers by "DanGoldstein91"
Browsing latest articles
Browse All 10 View Live

Answer by DanGoldstein91

I recently coded an enemy to only chase the player on an X axis in Unity2D. My object has a rigid body, so I can get away with using this: void chase() { transform.position = Vector2.MoveTowards (...

View Article



Answer by DanGoldstein91

I ran into this same issue last month, I used a bool to only allow sounds to fire off once per collision. I'm not sure what audio.isPlaying does so I added my bool alongside it. I think this might...

View Article

Answer by DanGoldstein91

Hi, I think I see the problem. When you press "R" to reload, every single frame that key is down is starting another instance of the StopReload() coroutine. I had this issue a lot and I fell in love...

View Article

Answer by DanGoldstein91

Try tweaking the sizes a different way. Instead of using pixels... var Menu11 : Rect = Rect(10, 10, 200, 200); Try replacing the values with the screen width & height divided by a float. Something...

View Article

Answer by DanGoldstein91

Hi, I recently ran into this issue myself. This isn't working because when you disable your game object, you're disabling all components and scripts attached to it. The attached scripts stop running...

View Article

Browsing latest articles
Browse All 10 View Live




Latest Images