Newest Questions
57,729 questions
0
votes
1
answer
98
views
Detail Distance and Tree Distance Not Working Correctly
I just started using Unity 6. Today I created a terrain for my game. My terrain also has details and trees. When I change the distance in the terrain settings, nothing changes. The default setting is ...
0
votes
0
answers
84
views
1
vote
0
answers
92
views
Steam Leaderboard is not receiving the scores that I upload
I'm trying to upload player scores to Steam. I'm using the STEAMWORKS.NET C# wrapper, but otherwise I'm just working with the Steamworks API.
Here's the code I'm using:
...
0
votes
1
answer
229
views
Decompiling a DXBC - why is an integer operation working with a massive float?
I'm decompiling a game's shaders with RenderDoc in an effort to understand them, and I encountered this segment:
...
0
votes
1
answer
172
views
Is the "View transform" just a change of basis matrix + a translation applied to each point? (to bring them into camera space)
I am learning about the graphics pipeline. My understanding of the view transformation is that you:
First create a normalized, separate coordinate system for the camera, based on its position and ...
2
votes
0
answers
81
views
Vulkan vertex from back peeking through
I am trying to render a .obj model with Vulkan 1.4. The object is rotated with a quaternion over time. The "front" geometry of the model is rendered as ...
0
votes
1
answer
113
views
What is the proper way to write a pixel shader that only outputs depth?
I have an effect that I want to only write to depth.
commandList->OMSetRenderTargets(0, nullptr, FALSE, &m_mainDepthStencilDescriptorHandle.getCpuHandle());
...
0
votes
1
answer
148
views
Modular Pathfinding Between Connections
I'm creating a puzzle for my game, where you have to arrange pipes to transmit an electrical flow from one point to the other. Each pipe center contains a connector hub and each end contains the ...
0
votes
0
answers
33
views
Mobile Input for android build
I want to make buttons for a mobile build, testing with android 11. To set variables, which I read in other scripts, I use the following code:
...
1
vote
2
answers
520
views
How do I implement the "collide and slide" algorithm in Unity?
I've recently been attempting (and failing) to create my own character controller for my 3D Unity game for around a week. I hate the Unity rigidbody physics system for making a character controller, ...
0
votes
1
answer
104
views
Why isn't my object following the target?
I don't understand why my object does not follow the player. I instantiate the character with the PlayerPrefs I saved from another scene. However, the object tracking code does not follow, and also ...
1
vote
0
answers
48
views
How to configure multi-project for minecraft server mod for different ports using common code with minecraft mappings?
I want to make a gradle multi-project to port a server mod I made for Forge to Paper.
The problem I'm facing is that the common project doesn't recognise any ...
-1
votes
1
answer
102
views
1
vote
0
answers
138
views
Original pacman hitboxes and cornering
I have been working on (somewhat) faithfully reimplementing pacman as a sideproject and means of better learning the rust framework Bevy.
However, there is one part that I really cannot quite get my ...
1
vote
1
answer
67
views
CapsuleCollider2D hitbox fails to trigger when player/enemy are stationary
I'm currently working on my first game in Unity, and I'm having some trouble with attacking. Currently, I have a game object with a 2D capsule collider child. When the attack button is pressed, the ...
1
vote
1
answer
196
views
Structuring Actions in Utility AI
I'm building a grid turn-based game, and I have a couple of questions about Utility AI that I can't wrap my head around for a couple of weeks.
Suppose we have a unit that can move X tiles and attack ...
4
votes
1
answer
250
views
Train simulator - approach to cars movement
I'm prototyping a train simulator and running into design issues with physics and train car movement. The scope is similar to games like Run8, SimRail, or Derail Valley.
Requirements:
Realistic train ...
1
vote
0
answers
118
views
How can I address multiple collisions within a single frame?
So, in my breakout clone, I've encountered issues where the ball will sometimes phase through bricks and the borders if it collides with one and then immediately collides with another after. My guess ...
1
vote
0
answers
52
views
Reserved Memory Keep Increasing When Loading the Same GameObject Using Unity Addressables
I'm trying to learn how to use Addressables in Unity to improve memory usage, but there's something I don't understand.
I use ...
0
votes
1
answer
56
views
Navmesh Agent unable to cross doorway?
I am facing a strange issue where the navmesh agent is unable to cross a doorway. It used to work earlier but now suddenly it does not anymore. I am unable to find any possible colliders or objects ...
0
votes
1
answer
125
views
How to instantly stop when moving the character with AddForce?
I made character movement using AddForce. But I don't understand how to get the desired effect. I need that when I release a movement key (for example WASD) the ...
1
vote
0
answers
61
views
How to Access Neighbor Chunk Block Data
In my voxel engine, each chunk has a 3D-blocks array that measures 17 x 100 x 17. The width and length of chunk is 16 but I added a padding to the array to store block data of a neighboring chunk.
...
0
votes
2
answers
169
views
How to make a raycaster render complex scenes?
I have written a simple raycaster in C++ which can render wall based scenes like 3d mazes. On YouTube I saw a video showcasing 3D games made in Scratch. One of the games were a 3d racing game where ...
1
vote
0
answers
71
views
How to move objects in a wavy pattern in a specific or given direction?
I'm making a bullet hell and I want to handle a variety of movement types for my bullets (waves, flying in circles, spirals, etc). I'm currently using the following to handle linear movement at a ...
0
votes
0
answers
74
views
Pygame won't display volume control
I'm making a game in Pygame running in Python 3.10 and the lastest version of pygame, and I can't get to display a volume control for the background music . The music is played correctly, but there is ...
1
vote
1
answer
195
views
How can I make liquid in my vr bartending game
I'm working on a realistic VR bartending game for Quest, and I need some help with making bottles pour liquid into cups. I'm aiming for a system where:
When a bottle is tilted, liquid pours out ...
0
votes
0
answers
67
views
LibGDX NullPointerException from a scene 2D Actor calling Pools.obtain()
fire (Event event) method throws the NullPointerException. Trace:
...
0
votes
0
answers
31
views
Bug Canvas image being stuttered when move follow player?
I tried to code an image to follow the character using canvas but it jerks when moving. Is this a bug? Do you have any solution to fix it?
https://youtu.be/OnT9Pabgi2g
...
0
votes
0
answers
115
views
What is the best way to draw chunks?
I'm developing a voxel engine with OpenGL and C++ and searching how Minecraft-like games set up VAO, VBO, and EBO. I'm also dealing with transparency geometry and depth testing issue.
There are 3 ...
0
votes
0
answers
102
views
How to avoid noise with Volumetric Fog?
I had followed the youtube video by Technically harry to create a volumetric fog effect in Unity.
But when I get close to a object, the noise is very noticeable which I would like to avoid.
I tried ...
1
vote
0
answers
156
views
How to conserve momentum in Unity?
I tend to use a lot of 2D physics based (rigid-body based) character movement in Unity, and despite lots of tweaking, I can never seem to use conservation of momentum.
I’d have to manually program in ...
1
vote
1
answer
129
views
Two Point Alignment Transformations
I'm trying to determine the transformation steps (position, scale, rotation) needed to be applied to an object so that two points, locally positioned in that object, line up with two world space ...
1
vote
1
answer
210
views
How do you create a "View Volume" for beginner 3D graphics?
Observer peers through window into 3D world (in this case three-dimensional Euclidean space). Using analogy of window for simplicity, observer perceives a 2D image from their PoV. A static, 2D ...
0
votes
0
answers
44
views
Share custom lighting data struct with GLSL vertex & fragment shaders
I've reached normal maps as I was learning OpenGL, and I decided to calculate the tangents on the CPU.
The issue is that my lighting uses custom structs and it ...
0
votes
1
answer
263
views
Screen/viewport cursor position to world-space pos
I'm trying to understand how to convert mouse coordinates to world space. There is built in UE blueprint function ConvertMouseToWorldSpace but I think it returns ...
0
votes
1
answer
135
views
What is the preferred memory to store game object into, Stack memory or Heap memory
In the context of game dev, what is the preferred memory to use to store structs like Entities or MapData which are large in size and have lifetimes lasting the entire game run-time.
For example here ...
0
votes
0
answers
69
views
Could anyone review my introductory understanding of 3D computer graphics? [duplicate]
Observer peers through window into 3D world (in this case three-dimensional Euclidean space). Using analogy of window for simplicity, observer perceives a 2D image from their PoV. A static, 2D ...
0
votes
0
answers
43
views
Utility AI Action Atomicity [duplicate]
I have a question about action atomicity in terms of Utility AI.
Let's say my unit has a melee attack and a default movement ability.
When I evaluate different actions that my AI agent can perform, ...
0
votes
0
answers
36
views
Help utilising obj indices [duplicate]
I'm working on an obj parser its mostly complete but ive run into a problem.
I can access all the indices that are in the file but i cant figure out how to use all of them.
i can use the vertex ...
1
vote
1
answer
143
views
How to propagate linear/angular momentum to parts when a 2D tile-based ship is broken into pieces?
I have been working on a project in the Godot engine about creating tile based spaceships. It works great and I find it very interesting. My biggest issue though is correctly simulating disconnections,...
0
votes
0
answers
70
views
How to disable lobby/relay for a project in Unity?
Me and a friend created a basic multiplayer game in Unity using Netcode For GameObjects. We also used Lobby and Relay Gaming Services to make it easier to play with each other.
There is only one ...
0
votes
1
answer
151
views
How to efficiently construct model matrices in a vertex shader from a small amount of data, for instanced rendering of many moving 3d game characters
I am trying to efficiently render many 3d game characters: many instances of the same 3d model which can change their positions and z rotations each frame. For reference I'm using OpenGL but this ...
1
vote
0
answers
138
views
When should I use (or avoid using) RPC Functions in Unreal Engine?
I'm currently working with replication in Unreal Engine and am wondering whether I'm using RPC Functions too much.
Most of my functions that are called on the server are unreliable. For example, I was ...
1
vote
0
answers
53
views
How to add flashlight to player in map downloaded from Fab?
I tried adding flashlight to my player downloaded from Fab, but I don't see any dynamic light from it:
I tried tweaking global illumination and rebuilding the level, but there was no effect. The map ...
2
votes
0
answers
70
views
Best Approach for Storing / Serializing Property Value Animations
Background
I'm making a platformer game, in C#, in Monogame. I've got a middling amount of experience with gamedev, having done some mini projects in Unity in the past and deciding I don't like a big ...
0
votes
2
answers
138
views
How to highlight only specific part of the UI image in Unity?
How can I highlight only specific parts of an image in Unity?
My image would be something like the example below: a grid with text and fields. Text can be separated, but I would prefer it be part of ...
3
votes
0
answers
244
views
How to make a Docker build for a Unity dedicated server?
According to my searching, there is no clear best practice for it.
What I tested that worked for me was making a Linux dedicated server build and dockerizing the build. The problem is that it's a two-...
4
votes
3
answers
3k
views
How to avoid cycles when one character stat can be enhanced by another?
I am creating an ability system in Unity and it is currently able to update base values of stats and keep track of persistent buffs/debuffs while taking operation order into account (Add, Increase, ...
15
votes
5
answers
5k
views
How to solve the “stuck on a level, the next level is locked” problem
Suppose I’ve got a game which is split into levels (level 1, level 2, etc).
I might decide on locking levels. That is, when a player first boots up the game, they can only play level 1. Once they have ...
0
votes
1
answer
157
views
Are Unity's default assets shipped with the project when built, even if they are unused?
A typical Unity project comes with some default assets. For example, look at these 2D sprites:
The Square asset is the default Sprite that gets applied to a ...