Questions tagged [unity]

Unity is a cross-platform game creation system that focuses on easy art pipeline process. It consists of a game engine and an integrated development environment. The game engine's scripting is built on Mono.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Rotate Object Smoothly When Dragging

I want to make a 3d object rotate smoothly when being dragged in a ui in Unity. My stuff currently works but I just can’t get it to rotate smoothly, I can only make it rotate instantly which looks bad....
Zagro's user avatar
  • 1
0 votes
0 answers
39 views

FixedUpdate in Unity

I am trying to test my project for different discretization levels of a game object. For this I use a metric to compare the dynamics of the object for different discretization (compare the positions). ...
the2second's user avatar
0 votes
0 answers
27 views

Enemy not responding to chained attack

I am working on a 2D mobile platformer where there will be different characters with unique skill sets. I am working on a character that should be able to perform chained attacks. I have a button in ...
shanksVR's user avatar
0 votes
0 answers
19 views

Move UI element by a specific amount relative to current screen resolution

I want to achieve the following: At some point in the game, the UI Image (dashed rectangle) should shift towards the right edge of the screen (black outline rectangle) up until the part of the image, ...
Russel Ledge's user avatar
0 votes
1 answer
47 views

Why are the transform game objects moving away from the snail when they are swapping their direction?

I am making a game in which I created a character (main player) and another character(snail). Now the snail will move on the ground, when there is no ground detected it will change its direction. I ...
gamePlay's user avatar
0 votes
0 answers
19 views

Change width/height of ellipse to always be circular, independent of viewing angle

I have the following shader graph attached to a quad that draws two circles at some position. Naturally, when viewed at an angle, the circles appear to be ellipses. I'd like to know how to adjust ...
Phyo's user avatar
  • 1
1 vote
1 answer
62 views

Units in Unity?

I have read that in Unity 1 cube of size 1x1x1 and scale 1x1x1 is representing a cube in real life of 1mx1mx1m. Now, the only setting I find, where I can input anything related to Units is gravity, ...
the2second's user avatar
0 votes
0 answers
27 views

Is there a way to make area affected by light completely white despite object color in Unity?

I have a 3D object that is affected with a directional light with a cookie texture (might be irrelevant). This object has a specific color lets say blue for the example. I would like the area affected ...
Ivan's user avatar
  • 307
0 votes
0 answers
11 views

Camera.main.WorldToScreenPoint does not return correct position

I have a cube in the center of my camera view, when I call Camera.main.WorldToScreenPoint(transform.position) I expect to get the same result as if I called ...
Majs's user avatar
  • 375
0 votes
1 answer
13 views

Change of computing power/ time needed when imported Mesh triangle number changes

I am doing a Unity project, that makes it necessary to import a mesh consisting of triangles. As it is possible to reduce the amount of triangles in a mesh and keeping the structure similar, I am ...
the2second's user avatar
0 votes
0 answers
19 views

Missing tiles when rendering an isometric Staggered tilemap in Unity

I'm trying to show tiles on an isometric staggered tilemap in Unity, but some tiles are missing. I think the problem might be with where I'm placing the tiles or some floating-point precision issues. ...
Nick785's user avatar
0 votes
0 answers
25 views

Fill color on an empty space on a sprite

I'm trying to make a coloring game, of which I already have a drawing (outline) of an object - let's say a face of a dog. How can I do it that whenever I click for example the eyes, it will "fill&...
DC37's user avatar
  • 1
0 votes
0 answers
17 views

ECS: How do I instantiate Entities from a file of positions

I am quite new to Unity ECS and am trying to instantiate a few thousand entities based on positions stored in a .csv file. The file format can of course change, if that helps. My problem is to import ...
kugelblytz's user avatar
0 votes
0 answers
21 views

Why is my toon shader not getting pixelated?

I made a very simple unlit toon shader that works great, however I have to also pixelate my objects, I tried adding this part marked in blue that modifies the UVs but that did not have the desired ...
Majs's user avatar
  • 375
0 votes
0 answers
14 views

When using a render texture to render game, how can I get more control of what to render?

I use a render texture to render my entire game, I lower the size to get a "pixelation" effect. I've run into the issue now where I need to render some things in world space that should not ...
Majs's user avatar
  • 375
0 votes
0 answers
19 views

In Unity: how can I get the precise diameter of the cross section of an imported mesh?

For a simulation, I imported a mesh structure into my Unity project. This mesh consists of triangles and cannot easily be modelled by spheres/ cubes etc. I am wondering, if there is a way to get the ...
the2second's user avatar
0 votes
1 answer
19 views

ForwardAdd pass gets weird results when a point light is on in Unity

I'm writing a custom shader for the transparent object with built-in pipeline of Unity2022.3.9f1. For Subshader the Tags set like below ...
OtakuFitness's user avatar
0 votes
0 answers
64 views

Ignoring global rotation in gyroscope controller

I'd really appreciate some advice from you guys. I am trying to process a gyroscope input and map it to my game, i.e. player tilts their device and the character on screen moves left and right. ...
Cato's user avatar
  • 33
0 votes
1 answer
22 views

Can I rotate the velocity of a rigid body?

In unity, I'm working on functionality for a shooting at the mouse position from the player's weapon in a top-down 2d game. I have a working gun that instantiates a bullet prefab, that moves towards ...
dotexe's user avatar
  • 11
0 votes
0 answers
10 views

How to stretch a cylinder when dragging with a Ray Interactor?

I'm making a VR game in Unity. I want to select a cylinder with ray interactor and drag it, and as I drag, it should stretch. This is the code I have currently for 2D: ...
SPP's user avatar
  • 1
0 votes
0 answers
15 views

SpriteResolver's category and label values null when I try to access them at runtime. How do I fix this and make sure I get these string values?

I'm working on creating an animation system used for mouth movement that works like this: BEFORE the animation clip starts playing, cache the SpriteResolver's state (category and label) Once the ...
KD867746's user avatar
0 votes
1 answer
23 views

Rotate UVs in shader and contains result into quad with repeat edge pixels

I ask for help - I need to rotate the UV scan inside the quad by a certain angle (set by a parameter) so that the result is embedded in the original UV, and the missing areas are repeat edge pixels. ...
AleVerDes's user avatar
0 votes
0 answers
22 views

why the car doesn't rotate with circle gameobject that the car is on to that

I have an issue with rotating objects with a circle that I create like this: I'm going on that but the car doesn't rotate with the circle rotator. Here is the rotator script that might help because I ...
Mobin Bagheri's user avatar
0 votes
0 answers
13 views

Find direction between transform in world and mouse pointer using screen space

I overlay my entire game with a render texture, meaning I cannot use world position for input since the mouse clicks the render texture. Instead I need to use screen space, I want to find direction ...
Majs's user avatar
  • 375
2 votes
1 answer
117 views
+250

Character controller that can handle sloped terrain and boxy ledge traversal

I am working on a character controller for a 3D platformer in Unity. I cannot find an approach that satisfies me. I have experimented with these approaches in order to learn about their virtues and ...
DyingIsFun's user avatar
  • 1,307
0 votes
1 answer
103 views

What is the general technique of optimizing a game's lag by updating thousands of mesh vertices using DOTS parallelism?

*Edit: I finally figured out after some profiling that the problematic code was not actually the ones part of ECS, but this line over here: ...
rasputin's user avatar
0 votes
0 answers
22 views

Follow camera is not turning when the followed object turns

I need a camera follow script to chase a moving ball. I've attached the script below to my camera, but when the ball turns left and right the camera does not turn ...
Haseeb Ashraf's user avatar
3 votes
0 answers
41 views

How can I create good looking sprite color stretching metaballs?

It has been 8 months I've been working on my metaball algorithm an the final technique I am trying out is writing magnets to which the sprite mesh edge vertices will update its position to, after ...
rasputin's user avatar
0 votes
0 answers
20 views

Stripe IAP Plugin Breaks on Build

I apologize in advance, I'll try and explain this the best i can, but i really don't know what's causing this. I have a project I'm building for UWP, I'm using Stripe IAP for in app purchases. The ...
Mashimaro7's user avatar
0 votes
0 answers
28 views

How do I get drag and drop to not break links?

Using Unity 2022.3.1f1 (LTS). Several sources have indicated that you can drag and drop items within the assets or hierarchy without breaking links, but when I do it, it seems to be treating it as if ...
Sean Duggan's user avatar
1 vote
0 answers
19 views

Best way to manage 100+ image targets in Vuforia/Unity

My current project is an app that will handle about 122 Vuforia image targets. My first approahc was to create an ImageTarget prefab and instantiate it with the right texture and TargetName, yet I ...
user2929416's user avatar
0 votes
1 answer
31 views

Unity's Camera.ScreenToWorldPoint is apparently "missing", what could be the cause?

I have a small Unity plugin project set up (working on fixing a broken mod), and the Camera class seems to be missing a method. I've added Unity dll assembly references, and everything is working ...
Manius's user avatar
  • 101
1 vote
1 answer
54 views

How to delete a face of a Primitive Cube

This code uses a Raycast to get the vertices, triangles, etc. of a Primitive Cube, them using RaycastHit.triangleIndex, I can get the triangle that the Raycast hitted, but there is a easy way to get ...
ガブリエル Gabriel's user avatar
0 votes
1 answer
33 views

How do I properly use Entities and ECS in a current project that uses MonoBehavior?

I have a class called SpriteMeshModifier, which is a MonoBehavior. Since the rest of my script depends on this class being a MonoBehavior, I have trouble deciding how to translate the bulky updating ...
rasputin's user avatar
0 votes
0 answers
17 views

How to synchronize pausing and unpausing game using Photon Unity Networking (PUN)

I need some help figuring out how to synch pausing and unpausing the game to other players. I have a UI button where players can pause using the code I have posted below. Pausing works fine with all ...
Ryan Cat's user avatar
0 votes
2 answers
74 views

How do I optimize computations for multiple game objects(>1000)?

It has been 8 months I've been working on my metaball algorithm an the final technique I am trying out is writing magnets to which the sprite mesh edge vertices will update its position to, after ...
rasputin's user avatar
0 votes
0 answers
15 views

Resolve dependency between two installers in Zenject

Im trying to implemet dependency injection in my Unity project by using Zenject. I have two installers. The first one is Monoinstaller who is responsible for injection and creation of scene objects, ...
Ilya's user avatar
  • 11
0 votes
2 answers
45 views

How to rotate NavMeshAgent toward its movement direction?

I'm working on a 2D game in XY plane. I've created enemies using NavMeshAgent and I've gave my agents way pints to move between them. The problem is that I don't know how to rotate them in the ...
A-Eye's user avatar
  • 3
0 votes
0 answers
29 views

Raycaster causes Freezing in Unity Using Oculus SDK and OVRPlayerController

I am creating a scene in Unity using the Oculus SDK and XR Plugin. My scene works well in the Quest 2 including 2 VFX I have added and sound effects. I am following a LinkedIn course about VR UI - and ...
user3046771's user avatar
0 votes
1 answer
16 views

How to use Camera.cullingMask to selectively render certain objects?

The documentation of this method doesn't provide any examples of implementing it. I don't understand how it works or even how I should use it to only render particular objects while not rendering ...
Nikhil Nair's user avatar
1 vote
1 answer
38 views

Instantiate prefab behind moving player

I'm trying to instantiate a bomb prefab behind the player. The script below works fine when the y rotation is 0,90,180,360. The bomb is instantiated behind the player. But for other angles, the bomb ...
single arrow games's user avatar
1 vote
1 answer
21 views

Isolating a mesh so it doesn't interact with Raycasts in Unity

My problem is as follows: I have a a convex hull of some points. Given a point that's outside of said convex hull, I would like to find the closest point on the convex hull. To that end, I have a ...
user1999728's user avatar
0 votes
0 answers
15 views

Export a Gameobject to USDZ in Unity for Android and iOS

I have tried using the usd sdk from Unity and it seems like there is no support for usdz export in runtime for iOS and Android in Unity. I was wondering: If anyone is familiar with any other external ...
Shuvro Sarkar's user avatar
0 votes
0 answers
22 views

Getting missing prefab error in unity

Getting the following error while loading a project on unity. I'm usung ubuntu
Vamsi Shankar's user avatar
1 vote
1 answer
75 views

Recreating The Lighting In Paper Mario: TTYD In Unity

Goal: I would like to recreate the lighting in Paper Mario: The Thousand Year Door. Currently, I am only using a directional light. I am also using URP. Comparison: Here is an example of how it ...
PayasoPrince's user avatar
0 votes
1 answer
34 views

Making contributions to a Unity project without having Unity editor installed

I'm interested in setting up a small Unity open source project so that non-Unity devs can contribute. I would limit their involvement to making a small change to only one script, say adding a new ...
waffles13's user avatar
0 votes
0 answers
36 views

Character is stuck between grid cell gap [duplicate]

I started making a D&D-style turn based tactic game. I have a problem with my tilemap. I made a script to find the location on the tilemap for my character and for the tile I clicked with the ...
James's user avatar
  • 1
0 votes
0 answers
32 views

How to combine 2 splines from different spline container in unity spline 2.3.0?

I'm working on with Unity Spline 2.3.0, I realize that the splines cannot be touch and combine with other splines that exits in different spline container. Is there any way to connect them? I tried to ...
Duy Hạnh Trần's user avatar
0 votes
0 answers
21 views

Stitch meshes with different level of detail

I have an implementation for generating a mesh using marching cubes with different levels of detail. The issue arises when transitioning between meshes with higher vertex density (smaller scale meshes)...
z3nth10n's user avatar
  • 141
3 votes
1 answer
339 views

How are character controllers built upon complex gameplay systems?

I would like some industry advice. I feel like the starting part to every game I create is the character controller. My goal is to create a solid base character controller that I can expand upon for ...
Jacob Edie's user avatar

1
2 3 4 5
322