Quantcast
Channel: Latest Questions on Unity Answers
Browsing all 171066 articles
Browse latest View live
↧

My enemy flies when following my player

My enemy flies when it is following my player. Here is my script. function FollowClosestEnemy() { var lookPos = closest.transform.position - RightArm.position; //lookPos.y = 0; var rotation =...

View Article


GUIText spawning when gameobject is destroyed.

I'm sorry if this has been posted before. I've searched for hours and haven't been able to find it. I'll try to be as direct as possible. I have a GUIText that looks perfect, it appears, it floats up...

View Article


What is the simplest way to move an object from Point A to Point B? (2D) (JS)

This is an absurdly simple question so I apologize, but all of my searches yield more complicated answers for more difficult problems that I can't understand without understanding this. I have a game...

View Article

Moving game objects

Hi guys, first big sorry for my bad english, im working on it ;) I want to ask you something. I want to move some objects in my game, its simple, there are asteroids which move from up to down (create...

View Article

Ngui: how to insert text on a label via javascript?

I just spent the last two hours searching on how to insert text on a label via javascript. It should be easy, I guess... I wanted to make a health bar and a timer. Can somebody help? I wrote this code...

View Article


Animations

I have two animations. A walk and a stab(with a knife). If the enemy gets too close it will stab otherwise it will chase you. But if the enemy gets to close he will finish his walk animation before he...

View Article

Importing models from 3D Canvas

I made a few 3D models on 3D canvas but they won't important on unity, can anyone tell how I can import them?

View Article

Using GetComponent in multiple scripts for same component? C#

Hello everyone. The title pretty much explains it all. I'm trying to reference the player's lives in my game in multiple scripts to make multiple things happen if it hits zero, but I keep getting...

View Article


How do I make a texture follow the mouse, using offset?

I'm trying to create this effect, and make it work also on the rotated cubes. It currently works when the camera is head on, and the plane is not rotated. ![alt text][1] It fails however once I start...

View Article


how i to do to save my highscore

how i to do to save my Highscore when i game over and C#Scripts High score Please Help Me

View Article

Particle movement jitter on mobile @ 30FPS

Hello. I have a simple, low particle-count effect. It looks great in the editor! When I move to mobile, each particle jitters badly - back and forth as it moves. + I added some code to show the FPS on...

View Article

All my text has become just random numbers

That's it in a nutshell. When I converted my project from Windows to Android, every single non - GUI or 3d text item became just a random string of numbers and letters, all throughout the game. Quite...

View Article

Draw an orbital trajectory of a ship

Hi guys i'm working on a game in which it will be possible to take a spaceship to go between differents planets. I already have a Sun with some planets turning around with a simple script : #pragma...

View Article


RenderTextureFormat.R8

Hey. Is there something special about this format? I get very weird values if I try to read from it's first 20% in horizontal direction. Everything else works just as expected and I only encounter this...

View Article

Script changes behavior based on order in which the lines are written

In this piece of code, the first of the two transform.position assignments works badly (the transform stutters or fails to go up inclines in the terrain), while the second works flawlessly, no matter...

View Article


Simply modifying polygon colliders

I have a sprite that is the map for a platformer. It looks like this. ![alt text][1] I added a polygon collider to the sprite, and it's all distorted. ![alt text][2] [1]: /storage/temp/23560-stage1.png...

View Article

Design Advice: Power Up System (static variables?)

hey there, I have a game in progress in which the player can fly around in 3d space and shoot weapons. I have various variables for the player like: movement speed, rate of fire, damage, hit points...

View Article


Hiding/Overriding the Action/Navigation bar on Android?

Hi A friend of mine tested my game for me on his Nexus 4, and he notified me that his action/navigation bar is active. As you can see it makes it so that the original screen resolution is calculated...

View Article

Help C#! Adding speed variable when following target transform.

I'm putting the finishing touches on my Pong clone but I am unable to change the enemy's speed once I set him to follow the ball's position.Y First things first, im trying to get it to listen to the...

View Article

How can I remove unneeded playback engines?

Can I just delete the folders in Unity/Editor/Data/PlaybackEngines?

View Article
Browsing all 171066 articles
Browse latest View live


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