All Questions
56,273
questions
3
votes
2
answers
885
views
Efficient 2D grid overlay on tiles without each cell being its own GameObject
So for my game I need the ability to add a grid overlay over my tilemap. Now I don't think that making the grid with each cell being its own GameObject with some SpriteRenderer would be hard to do but ...
1
vote
1
answer
25
views
How to detect colored pixel of Sprite3D texture with perspective camera ray?
I've tried to ray cast my mouse position to Sprite3D on screen but I have some problems with it.
...
0
votes
0
answers
27
views
Add a controls instruction overlay to game HUD
I was wondering how I could make an instruction panel for the users of my game in Unity.
I will add a photo to this post that shows an instruction panel.
Any explanations would be much appreciated!
5
votes
3
answers
852
views
How do I handle Game Screens in LibGDX?
In my game the main screen is the playscreen. But because I want to draw the menu and the gameover screen on top of the playscreen, I don't create separate screens for them. But if I want to replay, I ...
0
votes
0
answers
71
views
How Virtual Textures work?
I'm trying to understand how Virtual Textures work. After coming across this post:
https://discourse.threejs.org/t/virtual-textures/53353
And more research here:
https://docs.unity3d.com/Manual/...
0
votes
1
answer
146
views
How does planar shadow projection interact with perspective projection?
This question is about planar shadows as explained in Frank Luna's DX11 book. The author presents the 4x4 shadow matrix, whose bottom right element is n\$\cdot\$L (where n is the plane's normal and L ...
0
votes
2
answers
1k
views
Updating object positions after screen moves. Is there a better way?
I am making a top down 2D shooter using SDL2 for fun and I ran into a problem. I have a whole list of enemies each with their position on the screen stored in an array. Now you only see a portion of ...
0
votes
0
answers
36
views
Need help with artefacts when rendering shadows using a shadow map
I am encountering some weird artefacts when rendering shadows using a shadow map.
I am using C++ with Vulkan and GLSL shaders.
This is the vertex shader that calculates the ...
1
vote
0
answers
72
views
Is there a reason that we have to use homogeneous coordinates in rasterization?
Looking at the pipeline of games, I am confused about the necessity of homogeneous coordinates.
For gameplay logic, a 4x3 matrix is enough to handle translation, rotation, and scale. I can't think of ...
1
vote
2
answers
6k
views
How can I edit collisions in Unreal Engine?
I made a concave house model. When I import it to Unreal Engine it generates a simple box collision that covers the full mesh. I need a collision that only covers the walls. How can I generate one or ...
0
votes
1
answer
61
views
Pygame code/file structure
I am currently working on a Pygame project and would like to seek your advice on best practices for organizing my code, particularly when it comes to creating additional scripts. I find myself ...
1
vote
1
answer
273
views
In Unity shaders, how is IN.worldRefl calculated?
I want to know how the world reflection vector in shaders is calculated so that I can manipulate it, but there is no documentation on what it does or how Unity calculates it. How is the reflection ...
0
votes
1
answer
3k
views
How do you lock the camera down in ZBrush?
I'm trying to sculpt a tileable mesh on a flatplane and I keep inadvertently moving the camera when I go off canvas. Is there a way to lock the camera in place?
0
votes
1
answer
20
views
Seamless way to have touch be mapped to Input.mousePosition again in new input system
had not expected such a basic mapping to not come as default... what is the simplest way to do that simple mapping - that does not require modifying existing scripts?
1
vote
0
answers
84
views
Trying to implement undo system
I've got a problem with my undo system that ive made, the idea is I want to make a sort puzzle game like this => https://www.youtube.com/watch?v=VdXi9UQhOng
WHAT I UNDERSTAND
There is some ...
0
votes
1
answer
905
views
Capsule to Sphere Collision
For my Maths unit at university, we have to manually calculate if a sphere is colliding with a capsule collider.
The information I have to go with is this;
You have the following Sphere:
LadyBird3 -...
1
vote
0
answers
86
views
Why does ROBLOX use an object-oriented system rather than an entity component system? [closed]
I decided I would develop a game engine in c++, so I was thinking about different ways of handling objects. I also have experience with ROBLOX, so I know that it uses an object-oriented design as ...
0
votes
1
answer
534
views
How do I create a laser pointer dot in Unity URP?
I want to replicate the laser pointer dot as in RE4:
Here is a video that shows the laser in action.
I have tried to replicate it using a spotlight. The problem with the spotlight is that its size ...
1
vote
2
answers
123
views
Rotating 2D sprite around tilted Y axis
I am building a sprite that I want to spin along an axis. I am using SpriteKit on iOS for this, but I'm sure that the question is not really tool specific.
In my case, I have a sprite such as:
and I ...
1
vote
0
answers
35
views
How to fix collision for objects beyond their green lines?
As you can see in the image those are collision lines but its kinda of disingenuous as there are I would say invisible collision blocks on the X's, I tried messing around with the sorting layers and ...
1
vote
1
answer
63
views
Flying AI shakes when chasing and avoiding obstacles simultaneously
I've got a problem with my flying AI in Unity. When it just chases a target it's ok, but my system contains avoiding obstacles so when it starts to do it, it shakes weirdly.
As I understood using <...
0
votes
1
answer
757
views
1
vote
1
answer
456
views
OnPointerDown / OnPointerUp aren't working in world-space canvases
I'm working on a project where I have a main UI (Screen Space - Overlay canvas) and various game objects that have little popups above them (World Space canvas) that the player should be able to click ...
0
votes
1
answer
46
views
Transparent Composite Object In Unity HDRP
Potentially a big question, but it seems like it should be simple enough. I have an object in my game composed of multiple parts (connected GameObjects with their own renderers). I want to make this ...
0
votes
1
answer
561
views
Unity update sizeDelta in OnValidate based on Layout Group computed values
I'm trying to update the sizeDelta of a RectTransform in OnValidate. I'm trying to grab the computed values from a Layout Group.
Here's what I've got:
...
1
vote
1
answer
77
views
Is there a PBR-like material system for audio?
With visual/rendering materials, a very popular system for this is PBR. Materials made using PBR may define properties like albedo color, normal maps, emission, roughness, metallic, specular, etc. ...
0
votes
1
answer
75
views
How can I correctly pass 2 vertices instead of all 4 for a quad to a vertex shader?
If I am rendering quads, but all the quads will be axis-aligned (that is, their plane is always parallel to either the X Y or Z plane), I thought I could cut vertex video memory usage in half by ...
0
votes
2
answers
625
views
Blender export to unity via FBX: correct rotation
I know that the question of the right blender for unity export has been asked quite often, but it is based on the problem that the models are rotated 90 degrees.
In my case, the FBX objects are ...
-1
votes
1
answer
786
views
Why do we use GLSL(Shader) instead of CUDA?
I'm meaning GLSL and CUDA both utilize GPU to their maximum power and in some cases, I heard CUDA runs faster on Nvidia graphic card. So my question is why don't we use CUDA more often for GPU graphic ...
0
votes
1
answer
50
views
Reward System For HTML Game
i am new to coding and have started a little clicker game and right now im working on a reward system for when the players click amout reaches a certain value. i have figured out how to make one ...
1
vote
2
answers
58
views
When/Where to use Node2d as parent vs Other Node
tl;dr = When/Where/Why use 'Node2d' as the parent vs going straight to 'Other Node'?
I have just started diving into using Godot for the first time. I completed the Your First Game official tutorial (...
2
votes
1
answer
331
views
In an Entity-Component-System architecture how should my map be represented?
I'm migrating a 2D game I've been making using only SpriteKit to an ECS architecture using GameplayKit, and I'm still a bit clueless on how to achieve this. I think I got the gist of ECS, but yet, I'...
5
votes
1
answer
496
views
Need an option to send camera output as video or frames in Unity3d 2017
Tools I've used in Unity 5.x are breaking my 2017 scene... and I do not see a way to output video or frames from Cinemachine (although I am trying to understand all of its features).
What is the best ...
1
vote
0
answers
18
views
Is there a way to set SteamVR OpenXR to strict mode
Background
I'm having an issue where steamVR with an Oculus Quest 2 is being lenient with my use of OpenXR. For example
This is wrong (but works on steamVR)
...
1
vote
1
answer
185
views
UI mask and elements not visible after Async scene change
i have an async loading scene system that redirects to a loading scene and then to the target scene. The function works properly although i found out that some UI elements dont work directly on scene ...
0
votes
1
answer
1k
views
Import and run LibGDX project in IntelliJ
I followed this guide to import a demos project, but when I set the class path of the module to the desktop, then click on the button of the main class field and select the ...
0
votes
0
answers
71
views
Include camera movement and calculation in the 3D game
I was sent here by softwareengineering.stackexchange.com.
I am writing a WinForms .NET application using C#. I use SkiaSharp for drawing for performance reasons.
I can already create a cuboid, rotate ...
0
votes
4
answers
7k
views
How Do I 'Reset' my Render Texture When I Stop a Video Player?
I have a Unity VideoPlayer where I use a render texture with an audio source to play the video. VideoPlayer.Stop pauses the video and resets the time to 0. I want ...
2
votes
2
answers
3k
views
is there a way to check if an animatorcontroller has a parameter?
With mecanim, if you try to set a parameter that doesn't exist, it logs a warning. It doesn't throw an exception or return null or anything useful like that. So if I set a parameter very often that ...
0
votes
1
answer
1k
views
Tile draws pixels from adjacent tiles
Whenever I try to draw from the tile palette, this is the result. why does this happen? I have tried messing around with the palette, how the sprite editor has sliced the tiles and played around with ...
0
votes
0
answers
30
views
How to load a whole folder of assets without using a Resources folder?
I have a folder full of images that I want to keep ready in a script. The Unity way to do this is to have a MonoBehaviour with, for example, a ...
0
votes
1
answer
33
views
Infinite character loop when trying to play Dialogue
I am trying to make a dialogue system in Unity by following this tutorial: (29) 5 Minute DIALOGUE SYSTEM in UNITY Tutorial - YouTube. There is a slight twist to this and that is that I am triggering ...
-4
votes
1
answer
95
views
Why wont my code work
I have just started on a new short game and i am trying to figure out how to make a reward when i reach a certain value I expect that the counter starts at zero, and each time the button is clicked it ...
1
vote
1
answer
4k
views
Issues using NetworkServer.Spawn with Unity and Mirror-Networking
I am using Mirror to handle the networking aspect
When I spawn an object on the network, I Instantiate it on the server and then use NetworkServer.Spawn to notify all clients to spawn the object.
...
0
votes
1
answer
50
views
Sprite chasing a target using move_towards_ip does not move
I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
0
votes
2
answers
76
views
Euler Angle X is wrong after using Quaternion.LookRotation
I have an direction that I want the local player hub & camera to rotate at.
The game handles this by using euler angles which Y represents the hub rotation on the horizontal axis & X ...
0
votes
1
answer
743
views
How do I override a SteamVR Controller's transforms in Unity?
I'm trying to provide an illusion to the user by rotating the controller about an arbitrary axis in the LateUpdate() method. But this doesn't seem to be having any effect as the controller probably is ...
0
votes
1
answer
73
views
How can vertex position can be converted to fragment position?
I started learning open gl and graphics programming for a while (im using open tk as im working on c#) so i finally came across lighting where you make the ambient diffusion. Im pretty sure that you ...
0
votes
2
answers
65
views
Changing the type of an object in Unity
I'm new in coding from zero and I have some problems with architecture of classes (project mb?).
I have empty room that I need to add “equipment” to it later (change the type of room).
I already have ...
1
vote
1
answer
288
views
Area2D only detecting body_exited once
I am new to game development, I am practicing by creating a pong game.
I currently have an Area2D set up with a signal listening for ...