Quantcast
Channel: Questions in topic: "unity2d"
Browsing all 60 articles
Browse latest View live

Player won't stick to moving platform.

I have created some moving platforms for my game. There's a game object called PlatformPath1 which has children that define the start and end of the platform's cycle and then obviously there's the...

View Article


How to play sound on destroy (Unity2D)

I am making a 2d game and it has coins and when the player touches the coin I am trying to make the coin disappear and make a ding sound .the problem is that the coin disappears but no sound. using...

View Article


trouble setting map boundaries of top down 2d shooter

I am creating my first unity game which is a 2d top down shooter. I am very happy with how my player is moving around the map but I am having trouble setting up boundaries around the map. I am moving...

View Article

Almost any object can play a sound. They all need an Audio Source?

So, simple set up: 1. My game has 100 objects spawned. 2. These objects have a chance to play an ambient sound from an array of audio clips. Do all 100 objects need an Audio Source? I mean, for a...

View Article

Unity2d : Spawning in Prefabs

My question is how to randomly spawn in objects on the screen with out them spawning in over each other? and if there is no room to spawn, then they wont spawn, and will wait in line or get canceled...

View Article


GameObject starts drifting on X axis when doing high jump

Hey guys,my player game object keeps drifting on the X axis when he does a jump off platforms. This especially happens when he is high up, and during the jump I cant control where he lands! Below is my...

View Article

Sprite with rigidbody2d wont "glide" when gravity is 0

I have a flying plane(sprite) that has a box collider2d, controller script(named Pilot), and a rigidbody2d ![Image1][1] [1]: /storage/temp/38324-inspector.png The plane has an empty GameObject as a...

View Article

Unity UI System: How to click a button under an image

Hi everyone, Please take a look at the photo below. I have a button under an Image. I want this button clickable when I click over that image. How can I do it? Thanks. ![alt text][1] [1]:...

View Article


Bickford fuse as timeline in game process

Hello. I want to show the burning bickford fuse as the remaining time before explosion in the game, but I can't understand how to do it correctly. Options: 1) Remaining time is NOT a constant, so I...

View Article


Does Unitys built-in Sprites dynamic batching work differently and add more...

Hi All, I've put together a performance simple test using Unitys built-in 2D support. I have an ortho camera, a sprite prefab and some logic that spawns more and more of the same prefab which I click...

View Article

How to rotate turret in enemy direction continously?

I have created an empty game object and turrets image which i have made a child object of the game object,whenever an enemy is spawned ,it beahves randomly doesnt tries to loook at the enemy...

View Article

How to rotate the turret in accordance with enemy?

i have a game object with a script attached to it,i want to rotate it arround the z-axis,and make it continously point toward the enemy moving,currently my turret is rotating around z-axis but not...

View Article

Prefab or copy of game object behaving strangely.

It is really hard to describe this issue, but I am at a total loss as to how to solve this. I have a 2d character with a really simple character controller that allows him to move back and forth jump...

View Article


Move infinitely in targeted direction

For my game, I want to move my game object in specific direction but it has to travel any number of units. At present I have following code for deciding direciton. Vector3 direction =...

View Article

Linerenderer disappears or doesn't change after mirroring x axis

Hello! I'm working on a 2d project. I have a linerenderer not using world coordinates with only two positions: (0,0,0) and (10,0,0). The linerenderer is attached to the object gun that is found in this...

View Article


how to: make global variable

hi, i am newbie in unity. before i use vb.net. in vb.net we can create a module just for containing our global variables that can be used in all forms. can i achieve that feature in unity? the real...

View Article

2D Parallax movement

Hi, I am developing a game, in which I need to develop 2D parallax with multiple layers. The problem is I found 2 solutions for this on the forum: 1. renderer.material.mainTextureOffest = new Vector2...

View Article


Multiple languages support

I want to add multiple languages support for 2d game such as japanesse, french etc. At present game exist with english language only. I have created text with tk2dTextMesh. If I directly pass another...

View Article

Font blurring in Ipad

I am using tk2dtextmesh to display text. when I create new tk2d font and set in tk2dTextmesh, it works fine in unity, but in ipad its blurring too much. I want suggestion in this.

View Article

GameState Script Problem

Hi, i'm just a newbie who develop a 2d infinite runner game. i was following a tutorial and remade with my own asset. I got a problem when make the GameState script. here the script using UnityEngine;...

View Article
Browsing all 60 articles
Browse latest View live


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