Questions tagged as 'unity2d'

1
answer

Problem turning character in Unity 2D

I have the following problem when I turn my character in unity with the following function if (direccion < 0 && izq) { transform.rotation = Quaternion.AngleAxis(180, Vector3.up); izq = false; der = tr...
asked by 07.12.2018 / 21:15
0
answers

How can I create a center of gravity in unity?

Hello !, I'm creating a game, And I have a sphere that is in the point (0,0,0), Then I have another sphere next to it, The problem is that I want to make all objects tend to go to the point (0,0,0), Respecting the physics of rigidbodies and othe...
asked by 03.05.2017 / 00:24
0
answers

RPG, turn-based combat system, enemy does not attack

I decided to start doing an RPG, so I learned to use state machines. The problem is that by testing them, the enemy constantly debugs their damage, so I decided to add calls to the state WAITING , both in the hero and in the enemy. Now the...
asked by 21.09.2016 / 02:36
1
answer

Restart Level

I have the following question I am doing a Game in Unity 3d (2D) Well I felt the need to create a restart level "not when I die if I can not restart the level at any time since there are some small spaces where the Player could not enter this wa...
asked by 21.10.2018 / 19:33
1
answer

Problem with "Text" library in Unity

The problem that I have now, is that in my game I want to make a points counter that is shown in a text on the screen, but when doing the script, I get the error:    (Type UnityEngine.UI.Text does not contain a definition for Text '   and no...
asked by 01.08.2018 / 19:01
1
answer

How to rotate a 2D object to rotate towards the position of another object?

I present the following problem, I have an enemy that I want to turn towards the position where the player is, but I do not know that making the npc object knows which side to look at, the game in question is as if it were mario bros and not a t...
asked by 27.04.2016 / 06:11
1
answer

Multi-scene songs in Unity?

You see, I want to make a background music in Unity but I want it to continue even so change the scene, you know if you can, and if so, how?     
asked by 06.11.2018 / 02:59
0
answers

movement of the rigibody2d

because my code is not working I do not understand public Rigidbody2D rb2d; private Vector2 mov; public float velocidad = 1000f; public float moveHorizontal; public float moveVertical; void Update() { //creo un vector que guarda las cor...
asked by 10.12.2018 / 02:28
2
answers

The OnClick event does not appear!

You see, create a script in Unity to get out of the game, but, I had to add it to the OnClick event and when I looked for it I did not find it, does anyone know if something should be activated or add a script? Could you leave it here? I leave y...
asked by 26.10.2018 / 22:00
0
answers

Error showing data in a Grid layout group

I'm wanting to show a list of data obtained from the database the query and I tried it and it is correct since I print it in the console but at the time of showing them I get the following I have in a class that is where the text obtain...
asked by 25.10.2018 / 23:51