Questions tagged as '2d'

1
answer

c # - Unity - Error: Object reference not set to an instance of an object

I'm a beginner in C # programming, and I'm trying to learn how to make a sidescroller 2d game, but I could not get past a part of the tutorial. This is because the camera simply does not follow the character when I press play and Unity shows an...
asked by 29.05.2016 / 06:49
1
answer

How to move and rotate where the mouse clicks?

I created a script in which my character moves around the mouse but has a problem: it is not spinning > Y , this is the condition I had to create for it to spin on the X axis: else if (target.x >= target.z) But I wish that when he...
asked by 19.10.2017 / 06:14
2
answers

Problem with the Unity camera

I'm creating a game with unity 5 in 2d, and tried to create a script for the camera to follow the character by moving the camera transform. For this I followed some tutorials on youtube but when I was compiling the code indicated in the Lerp met...
asked by 08.02.2016 / 17:29
1
answer

HTML5 2D game webgl?

I am aware that most of the 3D game engines for HTML5 use WebGL technology, but I had a question when it comes to 2D. Some 2D gaming engines for HTML5 refer to the gl_xxx functions, that is, they use GPU resources to draw 2D, but I have seen som...
asked by 18.07.2014 / 20:20
1
answer

How to create a 2d animation as if it were a video, vignette or cutscene [closed]

Hello, I'd like to know how to create a complex animation in HTML5 / Javascript. By complex animation I mean non-cyclic animation as usually shown in tutorials. I need to create an animation like a cutscene with images, transformations on the...
asked by 28.07.2017 / 15:49
2
answers

How to calculate the Xmin, Xmax, Ymin, Ymax of an object?

I'm doing a simple " space invaders" game in OpenGl and in the part of the collisions I need to calculate the minimum and maximum X and Y values, but I still can not figure out how to do this. This is the code I use to create an enemy ship:...
asked by 17.01.2017 / 16:07
0
answers

Move an object in the direction of "onmousemove"

I'm trying to move an object in the direction in which the person presses the screen, moves and then releases. I tried to use some for ties (it was the only thing I thought) but to no avail.
asked by 05.07.2015 / 03:04
0
answers

Drawing lines in unity3D 2D mode

I'm developing a 2D game and would like to draw the trajectory of launching an object. But I'm new to unity3D (the goal of the game is to gain experience on the platform), I know what I need to do the trajectory what I want is to know how to dra...
asked by 21.07.2015 / 20:41
1
answer

Drawing through a .txt

I am having a great question about how to pass the data from the read2File method to the variables hairX and hairY, in readingFile2D it runs through a file populating vx and vy with the values of .txt, can someone give me a light on how to do th...
asked by 05.03.2015 / 19:13
1
answer

Error when using JPlay framework for games!

Hello, I'm trying to program in java with the JPlay framework, and I'm finding an error that was non-existent on another pc I had. The error step is in this video lesson: link game class code: package jogo; import jplay.GameImage; import...
asked by 16.05.2018 / 02:53