Questions tagged [2d]

2D refers to two dimensional space where coordinates are represented with X and Y values.

Filter by
Sorted by
Tagged with
1 vote
0 answers
84 views

How do I cut mesh partially with EzySlice?

I'm using the EzySlice framework to cut meshes (https://github.com/DavidArayan/ezy-slice). So far it can cut a mesh but infinitely but I want to be able to cut partially like this: As you see in the ...
user avatar
0 votes
1 answer
40 views

Overshooting when traversing between two points with a set velocity

I'm creating a prototype for something I may make into a game and I've run into difficulty in creating a method to move a ship along a line between two points. While it reaches the end point, it ...
user avatar
1 vote
1 answer
80 views

Find those points lying on a circle from a ton of points

Given a 2d scene and 10,000 players with coordinates in the scene, I want to implement a function, the input is a circle with the center coords and its radius, the output is those players that lie on ...
user avatar
0 votes
0 answers
27 views

custom 2D skeletal animation

I'd like to animate my 2D player by interpolating him between keyframes of joints/bones. He's to be very simple, just a chunky stickman outline of coordinates with no sprites. I want to make it all ...
user avatar
1 vote
2 answers
268 views

Shooting from Gun in LibGDX

I'm trying to shoot a bullet from the tip of a gun. This gun is a Sprite object and it is constantly being rotated to point towards the mouse. The issue is that the point to shoot the bullet from is ...
user avatar
0 votes
1 answer
362 views

How do I make an object bounce off the wall?

I am spawning objects at a random place at the top of the screen, tilted at a random angle like this: ...
user avatar
0 votes
1 answer
48 views

How to recreate a comic book panel transition with my canvas (simple 2D background art)?

https://www.youtube.com/watch?v=Tqqf5Y8LyR8&t=23s&ab_channel=ErikLoyer So I want to achieve a transition like from the above video, specifically at 0:23 the TRACK, but there is a 3 Dimensional ...
user avatar
  • 1
0 votes
0 answers
75 views

match-3 Board border

I'm new to unity and I'm currently working on a match-3 game. I know there are a lot of similar games and that's why I would like to know what is the best way to autogenerate border of a match-3 board ...
user avatar
  • 1
1 vote
1 answer
123 views

How do I carve rooms and corridors into my map to connect exits placed at the edges?

I'm creating an adventure/RPG top down game where the map is randomly generated divided into zones. A major problem I'm having trouble figuring out is creating exits placed at the edges. The game is ...
user avatar
-1 votes
1 answer
78 views

How to make environment art like the building interiors in Digimon World 3 [closed]

I'm wondering how to create art like this (the map, not the characters), is this 2D or 3D?
user avatar
0 votes
0 answers
92 views

why is my grappling hook pushing me when i flip the character in godot

When i flip the character and use the grappling hook it pushes me away from the grappling hook and not toward. player.gd ...
user avatar
1 vote
1 answer
25 views

Odd behaviour when changing rigid body velocity inside OnCollisionEnter2D

This is the code I'm using to make an object bounce across the scene: ...
user avatar
  • 1,075
2 votes
2 answers
432 views

How to use different drag values for the X and Y axes on a Rigidbody2D?

I'm building a small 2D character controller using Unity physics to simulate an oldschool platformer. I know this is not the best way to do it and I have my own version using just raycast and custom ...
user avatar
  • 1,075
0 votes
0 answers
142 views

2D Top Down Follow Camera Stuttering

I am making a top down pixel art game and am using a simple follow script for my camera. ...
user avatar
  • 1
0 votes
2 answers
104 views

Help with multiple powerup types

I am trying to have a single class that handles multiple powerups types and using enum for the types of power-ups and switching the powers based on enum however when there are multiple power-ups in ...
user avatar
0 votes
1 answer
179 views

How to perform 2D vector graphics operations in Unity

I am currently working on a game that is drawn completely by 2d vector graphics operations like e.g. drawRoundedRectangle drawPolygon fillRect withBlur How can I perform such vector graphics ...
user avatar
  • 103
0 votes
1 answer
322 views

Unity 2D - Raycast not colliding with collider in very specific circumstances [duplicate]

I've been trying to work out what could be causing this bug for days now but can't figure it out for the life of me. I'm trying to make a fish avoid the walls of it's tank in a Unity game I'm creating ...
user avatar
0 votes
1 answer
25 views

how to add overall collider to a bunch of circles or boxes?

I have 3 circles (2D) they all have circleCollider2D. what I want is to make a collider that make border around them. I can't express which type of collider I need, so I put example image below. Red ...
user avatar
0 votes
1 answer
224 views

Prevent Player from Moving During Jump

I am new to Unity, and am trying to make a simple 2D platformer from this video, and I am trying to modify it to prevent the player from being able to switch directions during a jump. Right now, you ...
user avatar
  • 113
1 vote
0 answers
44 views

Object stuck against an obstacle still pushes other objects away

I have an object pinned against the ground by a revolute joint. A motor on the joint makes the object spin. Sometimes the object becomes stuck pushing against a static body. When it happens the object ...
user avatar
0 votes
0 answers
32 views

Having problems with mouse drag mesh vertex deformation in 2D

This is in 2D space. I want to create a mouse dragging mechanic like the one shown in the picture where I find a range of vertices relative to the position I first clicked where the red vertices have ...
user avatar
1 vote
1 answer
177 views

Generating consistent terrain chunks with unpredictable per-chunk seeds

I am working on an automatically generated (theoretically) infinite 2D world. The grid would be separated in chunks made of thousands of world tiles. We plan to use a Perlin noise function to generate ...
user avatar
  • 113
0 votes
1 answer
26 views

How can I make a button active when all the items of my array have been displayed? (for a dialogue scene)

I've coded something in Unity using C# (see below) for a dialogue scene separate from the actual game. On the click of a button from the game, the player is taken to this dialogue scene where the ...
user avatar
1 vote
1 answer
46 views

How to prevent GameObject from moving?

I am making a pong game and here's the problem. The ball hits the enemy paddle and instead of reflecting the ball just takes the paddle with it. Ball Brains - ...
user avatar
0 votes
0 answers
19 views

Help with arrowmechanism

...
user avatar
1 vote
2 answers
215 views

How to blend a 2D terrain

Rimworld (shown above) has many different terrain types. In order to achieve Rimworld styled terrain, I need to achieve two goals A) How to render differently textured terrains B) How to blend these ...
user avatar
  • 1,102
0 votes
0 answers
100 views

Using UI buttons for Input Manager

My character is supposed to be moved by 4-directional joystick. Until today I was using basic Input Manager for handling this from keyboard. I mean Horizontal and Vertical Axis. How can I make it so ...
user avatar
  • 1
0 votes
1 answer
108 views

How do I find the correct vectors perpendicular to a vector in between two vertices?

I'm trying to push the purple vertices inward by moving it with a vector perpendicular to the red vector shown in the picture. Each directional vector created will move its respective vertex towards ...
user avatar
2 votes
1 answer
104 views

Detecting Surrounding GameObjects

Some Background Context: So I have a 2D prototype in Unity I am working on that has enemy entities that have rigidbody2D component set as dynamic as I am using physics (...
user avatar
  • 151
0 votes
0 answers
37 views

Why my output image is not seamless?

I offset a region of an image but when I tried to restore it using same method it doesn't look right. here is my input and output: And this is the code I used to restore : ...
user avatar
0 votes
1 answer
87 views

Find Largest Room in 2d World

I'm currently working on a generated(Perlin Noise) 2D Cave System with Unity. The Caves currently look like this: What I want to do is spawn the Player (and other stuff) in the big Part of the Cave ...
user avatar
0 votes
1 answer
66 views

How do I make my obstacles (separate prefabs) appear randomly in the world?

I am using Unity in C# to code a game similar to Google's Dinosaur Run where random obstacles are spawned in the player's path which they need to jump to dodge. I have 6 different prefabs (with ...
user avatar
0 votes
1 answer
29 views

Drawing multiple simulation ticks in a single render frame

I have a 2D fixed-timestep simulation (a bunch of moving sprites) that ticks several times per render frame. I would like to render the state of each tick, so that all the ticks between render frames ...
user avatar
0 votes
1 answer
50 views

Connecting rooms after BSP

...
user avatar
0 votes
0 answers
25 views

Rigibody2D remove push-power

I have a player's prefab. The game is online, so when the player joins I place this prefab on the map. There are other players on the map. The player himself is controlled by Rigibody2D component ...
user avatar
0 votes
0 answers
62 views

How do you make a Unity 2D ball roll down a LineRenderer EdgeCollider2D incline?

How do you roll a 2D Image sprit ball using just the Unity builtin physics components on linerenderers with EdgeCollider2Ds? Tested my setup to work with physics. And PhysicMaterial2D so it bounces ...
user avatar
  • 174
0 votes
2 answers
192 views

How do I convert 2d character rigging animation to frame by frame sprite animation?

In this video after about the 8th minute, he says he converted them from character rigged animation to the frame by frame animation, so I searched but couldn't find any answers on google. How do I ...
user avatar
0 votes
0 answers
11 views

Stationary touches detected in inspector but not in the build

I want my game to detect when I touch and hold. The touch works both in the editor on my phone (with unity remote) and in the apk build. The touch hold only works in the editor when I play on my phone....
user avatar
1 vote
0 answers
24 views

How can I draw a partial circle with LineRenderer?

I'm using the following code, which I found online, to draw a circle with a predefined radius centred on a predefined point in LineRenderer (2D game). ...
user avatar
  • 11
0 votes
1 answer
333 views

How to make a shadow-casting day/night system in 2D URP?

I am trying to achieve a day/night lighting system similar to the game RimWorld. Short preview of what I want can be seen here: https://giphy.com/gifs/VgzcwtjueP7BrYSrXe Instead of using Global Light ...
user avatar
0 votes
0 answers
68 views

HUGE 2D worlds in Unity (like spaceflight simulator)

I am a beginner in the field of game development and I am having some doubts regarding some stuff... I am trying to build a 2D space-rocket-orbit game like the Spaceflight Simulator and I'm not able ...
user avatar
0 votes
1 answer
63 views

Two players using touch control simultaneously

I am working on a game like soccer star and I made a controller using YouTube and stuff. I added two players in the same scene and put this script on them. But when I play with player 1, then player 2 ...
user avatar
  • 7
0 votes
0 answers
32 views

Circular Z ordering problem

I am creating a day-night cycle for my 2D side scrolling game and I have a big problem. The problem can be best understood if you look at the following image: Problem is very simple: the moon should ...
user avatar
  • 149
0 votes
0 answers
33 views

2D side-scroller : how to place structures in a noise generated map?

I'm creating a little terraria-like 2D side-scroller game with TypeScript. The map is generated by a 1D noise which indicates the height of the ground at each block. I am looking for the best way to ...
user avatar
  • 3
8 votes
4 answers
4k views

How to determine if a 2D image represents what player sees in 3D game world?

I'm working on a game idea where the player is shown a 2D image (say, a "photo") and the player must find a spot in a 3D world where the view is about equivalent to that photo - not ...
user avatar
  • 1,048
1 vote
0 answers
92 views

2D Armor/Weapon System (Paperdolling)

I´m currently working on a 2D RPG where you should be able to compose your character from diffrent armor/weapon parts. For example the character can wear a "wooden helmet" and a "chain ...
user avatar
2 votes
0 answers
63 views

2D game make precise collisions

I am currently creating a personal 2D tile map game in Java. This is the first time I have attempted to make any sort of game, so I don't have a lot of techniques known by experienced developers. ...
user avatar
0 votes
1 answer
148 views

How would I incorporate gravity and gravity affecting obstacles into A* pathfinding in a 2d side-scrolling game?

I want to be able to modify the A* pathfinding in a way that I can get my NPC from his current position to any point that's within reach. The tricky part is that this takes place in a side-scrolling ...
user avatar
  • 1
0 votes
1 answer
55 views

Sprite transparency fails when rendered through shader

I am currently trying to implement a shader to a sprite of mine, but the transparency is completely removed when the texture goes through a Sample Texture 2D node. The sprite under the Sample Texture ...
user avatar
-3 votes
2 answers
157 views

Better use background chromas or transparency?

For png 2D sprites, its better use chromas or alpha channel? What is more performant during run-time processing? What uses less storage? Any difference between ...
user avatar

1 2
3
4 5
67