Face player right/left
I have a player that runs right and left. His body is always faced to the right. I want my player to face right when i make him run right and face left when i make him face left. I have a code that...
View ArticleWhen I start to try the game, My car/character go to the left automatically
Hello, I'm beginning with unity and I tried the Example Project (of Unity 5 & 4) my character/Car go to the left automatically (I'm doing nothing, but my car go to the left). I don't know why :(....
View ArticleHow can I get the x position for the left(and right) of the screen?
In Unity, I am making a game where spheres spawn at a random position. I want the spheres can spawn a little outside the screen. This is the code where the spheres spawn: `Instantiate (sphere_prefab,...
View ArticleHow can I set a GUI.box` align point?
I know there is a function to set the text-alignment but I can`t figure out how to set the box` align-point. It is aligning at the upper-left corner, but I want to align it in the center screen.
View ArticleHow to make the front, left, right, or the back of a gameobject look at a...
I have a gameobject that i have rotating around a target and i would like for the gameobject to face the direction of movement by making the left or right of the gameobject face the target when moving....
View Articleleft force right force
![alt text][1] I want to apply force as the picture probably I use AddForceAtPosition but I dont use help me ? [1]: /storage/temp/60897-gorsel.png
View ArticleC# Xbox One Controller Left Stick Rotation Issues
I've been working on a script for rotating a gameobject with the left stick of an Xbox One controller. It will rotate if I move the left stick along one of the x or y axis. But if I rotate the left...
View ArticleRigidbody2d Moving up and Down but not left and right
Hello guys, Fresh unity user here, My RigidBody2D (pong game) is correctly moving up and down, but not left and right. The code seems simple, but i can't understand why it's not moving. I have set the...
View ArticleUI - How to align all texts to the left
Hello I am currently trying to make a menu, containing 5 buttons. When a button is hovered over, it changes colour. The text however, shall be changed by script later, so I had to find a method to...
View Articlehow to control player movement with ui buttons?
kinda explained it in the question, ive looked everywhere and found plenty of examples so i kinda know what im doing but not how to do it, my script right now manages keyboard keys for left right and...
View ArticleSwipe Control for Android , Move left and Right ( vertical )
hello world i've a problem with my game ( Ping Pong ) for Android ; the paddle of player can't Move on my smartphone , so pliiz give me the script of swipe control and thanks in advance .
View ArticleEnemy moving left towards player.
I'm very new to Unity and coding, so I appreciate your patience. I'm creating a 2D sidescroller where the character is always stationary on the left side of the screen. You have to use gesture attacks...
View Articleso how to i create a moving barrel
im creating a tank game and i want to have a mouse look so the thing that holds the barrel on top moves left if i move my mouse left and right if i move the mouse right. but strictly so that it only...
View ArticleHow to determine if an Enemy is moving left or right?
First, here's the code using UnityEngine; using System.Collections; public class BMoveAI : MonoBehaviour { public Vector2 pos1; public Vector2 pos2; public float speed; void Update() {...
View ArticleUnity 5 Movement swipe to left and right and up and down
Hello can someone make a this script work with swipe like when you swipe to the side you move to the side and when you swipe up it jumps here is my script PlayerControl using UnityEngine; using...
View ArticleHow to make player move along x axis?
I am making a game where the player is moving automatically with this script using UnityEngine; public class MovementForward : MonoBehaviour { public Rigidbody rb; public float forwardForce = 2000f; //...
View ArticleHow do i make it more horizontally with no rotation?
So i am making a "car" game and i want the car to only move forward and back, and left and right, without rotation. I want it to just translate into its next position. I already have the car moving...
View ArticleHow to access trackpad or DPAD input controls in unity application?
In my project I made an unity android application support for ODG glasses R7. There are two modes for taking input controls in ODG glasses , one is cursor mode and other is selector mode. In selector...
View ArticleI want to move my cube on right or left when I touch screen for Android...
![alt text][1] [1]: /storage/temp/103608-screenshot-20171012-2303071.png strong text
View ArticleUnity 5 character movement problem with strafing left and right,Cannot get...
Hello guys, since yesterday I have been having a problem with my character movement. The character moves well. I mean he goes forward and backwards, left and right however I would like him go left and...
View Article