Quantcast
Channel: Questions in topic: "left"
Browsing latest articles
Browse All 135 View Live
↧

UI - 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 Article


how 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 Article


Swipe 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 Article

Enemy 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 Article

so 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 Article


How 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 Article

Unity 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 Article

How 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 Article


How 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 Article


How 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 Article

I 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 Article

Unity 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

Check where mouse is clicked

Hello! When you use Input.GetMouseButtonDown(0), what's a way where you could tell where it is pressed? Pretty much I want it to be like where if you click the left of the screen, it does a function,...

View Article


Character direction can't be changed before the character reaches a screen...

Hello everyone! So I have this player that goes from left to right when I hit the "right" button, and it goes from right to left when I hit the "left" button. When I hit the "left" button, I can press...

View Article

Jump from position A to position B

I am making a simple 2D game and I have two platforms and you can jump left or right. I need the jump to be to a fixed position on the platform and I dont want it to just teleport there. Is there a way...

View Article


Using Accelerometer to move and rotate a 3d cube from left to right

I have been working on making a simple dodge the falling cube game and I have my movement script working, the problem that I'm having is that I want my cube (Player) to rotate on its z axis in the...

View Article

can't move player rigidbody.velocity

using System.Collections; using System.Collections.Generic; using UnityEngine; public class Obstacle : MonoBehaviour { Rigidbody2D rb ; public float moveSpeed ; private void awake () { GetComponent ()...

View Article


Sprite tilts left/right depending on how far it is from the center [C#]

Trying to make a game which has the "Tinder RPG" genre made by Reigns where you swipe cards left or right and it tilts the card depending on how far it is from the middle. I've tried...

View Article

Raycast always hit a point at bottom left corner

Hi all, I'm struggling to make a raycast hit a target that I previously moved at a speciific point. Here's my code : Ray camRay = m_camera.ScreenPointToRay( m_spherePosition.position ); RaycastHit hit;...

View Article

Sprite wont flips left when still. Need Help

Hi guys really need help. when still my sprite flips left and I need him to face the direction I press. Please help. Heres my script. using System.Collections; using System.Collections.Generic; using...

View Article

What are the errors I'm making and how do I fix them

public class Player : MonoBehaviour { private Rigidbody2D myRigidbody; [SerializeField] private float movementSpeed; private bool facingRight; // Start is called before the first frame update void...

View Article


moving like a snake to the right and to the left

using UnityEngine; public class test : MonoBehaviour { [SerializeField] private float speed = 10f; public void Update() { transform.Translate(Vector3.up *speed * Time.deltaTime, Space.World); } } have...

View Article


endless runner rotating

I need a runner script like temple run but with smooth rotation along the path![alt text][1] [1]: /storage/temp/152823-road.png

View Article

Brief sharp noise burts / clipping in soundtrack after Webgl build

Hi! The audio in my project sounds perfect in Unity and when I choose "PC, Mac & Linux" platform build. But when I choose Webgl and upload to itch.io a "clipping" sound appears spontaneously on the...

View Article

AddForce to the left.

Hi, I'm quite new to unity and I am making a little game where you can shoot to the left and to the right with the arrow keys. I made the projectile go to the right with this line....

View Article


Bullet Counter Not Working Propperly

hey guys i have 2 scripts that handle my weapon i have a problem and dont exactly know how to fix it the problem is in my player_shooting.... Script.... my ammo left is goint faster than my bulletrs...

View Article

How to Make an Endless Runner Move from track to track smoothly

Hi, I'm making my first game - endless runner 3D, but I can't figure out how to make that player change lanes smoothly. I also don't know how to make it work on the phone - the player switches to the...

View Article

problem with scripting movement

Hey, so I've followed a guide by code monkey where he shows how to script jumping and movement. All the jumping part is ok (although I had to change it a little to work, I don't know why) but there is...

View Article

Move player to left and right ( android Touche )

this script its for windows keyboard i want switch to android touche using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController: MonoBehaviour { public...

View Article



Left And Right Animation For Mario Kart Characters

I Need A Script For Left And Right And Animation For My Mario Kart Game When I Click A or D I Want it to make Mario,Luigi,Metal Mario,Gold Mario,Donkey Kong,Diddy Kong,Yoshi,Birdo,bOWSER,The...

View Article
Browsing latest articles
Browse All 135 View Live