Skip to main content

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
8 views

Even after changing Default Behaviour Mode to 3D, my scene still remains in 2D. Why?

I had created a new scene, which didn't have sky and directional light. To solve this, I created a new skybox, then added to the maincamera. But there was no difference to scene & game view. ...
Minchae KWAK 12HSC's user avatar
0 votes
0 answers
8 views

Get all the vertices my game object covers

I want to get all the vertices of an 3D object. I'm using this: ...
obada's user avatar
  • 1
0 votes
0 answers
16 views

How to make a full authoritative server? [closed]

Hello I want to make a multiplayer game with authoritative server and studying articles and videos I have a few questions. I don't want to use Photon and similar solutions. People claim that cheaters ...
stackoverflowrussia's user avatar
0 votes
1 answer
19 views

Why does a numeric input field appear in my Unity event when it doesn't in the tutorial?

I was making a game main menu by watching a video online. In that video, while setting the volume Slider, after adding the coded script in the On Value Changed section and selecting ...
Volkan AKDAG's user avatar
0 votes
1 answer
18 views

Unity scene doesn't have skybox and lightsource

I am a beginner in Unity and 1st time asking in this platform. I am working as a team and I got invited to this project via Github. (if this matters at all) I want to work in 3D environment and I ...
Minchae KWAK 12HSC's user avatar
0 votes
2 answers
38 views

2D drag and drop dynamic rigid body spinning out of control in Unity

I'm trying to make a 2d game that involves dragging and dropping certain dynamic physics objects (like squares) and I am a beginner. I need it to look like the rest of the object holds a weight when ...
Kareem Shamma's user avatar
0 votes
0 answers
51 views

Why do I have to freeze my player's x and z rotation to make my player movement work and why does my camera stutter when colliding with things?

So I have an empty object called player with the PlayerMovement script and a rigidbody. I have the main camera and player visual as childs of it. The movement works ...
MrV's user avatar
  • 3
0 votes
0 answers
37 views

I am trying to move a sphere along a curved path made using spline. The problem i am facing is that the ball's velocity when i apply torque is less

I am trying to move a ball along a curved path using torque on the rigid body. The problem that I am facing is that the ball's velocity when I am applying torque is really less, it moves really slowly ...
Ken's user avatar
  • 13
1 vote
1 answer
46 views

Endless runner in Unity, resetting orgin just cause player to fall and the track keeps moving to infinity

I'm working on a very simple endless runner, tracks are generated in a straight line, one on the end of each, the player simply runs towards the Z axis. Every attempt I've made to reset the origin ...
J. M. Becker's user avatar
0 votes
1 answer
39 views

RigidBody floating in th air

I added a death animation among some other things in case of death. But after playing it the player is airborne, so I might need to change the pivot. But I'm wondering if this can't be done with some ...
martin suchodol's user avatar
0 votes
0 answers
28 views

How can I check if the rigidbody is moving

The problem is that rb.velocity probably returns too small values ...
martin suchodol's user avatar
0 votes
1 answer
61 views

Why does my "Game" tab show images with grayish/wrong colors while my "Scene" tab correctly shows images with correct colors in Unity?

I create a Unity project. The "Scene" tab shows the image with the correct colors. But, the "Game" tab shows the image with a grayish colors, which are the wrong colors. Here is ...
Job_September_2020's user avatar
0 votes
0 answers
25 views

Creating nose snot/cough splashed effect on camera

I want to create a nose snot/cough/vomit splash effect on camera. The idea is that during gameplay NPC is gonna perform those actions on my first person view player. I was trying to modify below ...
mosharaf13's user avatar
0 votes
1 answer
60 views

Why is my player not colliding with animated obstacles?

I can't figure this out. My obstacles have a basic box collider on them and my player has a rigidbody based controller and collsion detection is set to Continous and when obstacle hits him it just ...
Ivan's user avatar
  • 339
0 votes
0 answers
25 views

Why don't the particles show up?

I'm new to unity, and would like to have particles appear at the point where the ray hits an enemy(hit.point). But this does not happen, and moreover, for some reason the bloodps variable “oscillates” ...
kaliboba's user avatar
0 votes
2 answers
62 views

Normalize an angle in unity

How can I normalize angle between min value and max value? like normalizing -1136316.78186234° between 0° , 360° or between 180° , 360°. Node: for now I'm using double value as angle. Thanks for ...
Ahmed Dyaa's user avatar
0 votes
0 answers
24 views

Implementing Intersection Logic and Mesh Construction for Procedural Spline-Based Roads in Unity

I’m currently working on a project in Unity where I’m creating procedural roads based on splines. At present, the roads are implemented by extruding a 2D shape along a spline or a straight line, ...
xephosbot's user avatar
3 votes
0 answers
110 views

Game slowing motion down instead of low FPS

I'm making a bird game where you fly around a somewhat large environment of low poly assets. During testing, I found some behavior on one device that I cannot explain: The game slows down instead of ...
Cebbi's user avatar
  • 201
0 votes
0 answers
32 views

How can I instantiate an object on all tiles of a hexagonal tilemap?

On startup, I want to instantiate a text object on each tile (displaying its info). How can I accomplish this for a hexagonal tilemap? Here's my poorly written code that doesn't work. It seems to ...
Alyssa's user avatar
  • 1
2 votes
1 answer
26 views

Deleting components via OnValidate script while in editor

I want to create different types of platforms for my game, and they are currently all in different prefabs. This works fine, but it is just taking so long to search for the prefab, dragging it in, and ...
CheckerT's user avatar
0 votes
1 answer
37 views

Tilemap.SetTile results in no visible change in build

I have an issue with how the Tilemap works in build, using version 2022.3. I update my Tilemap with Tilemap.SetTile(Vector3Int pos, null) and it works just fine in ...
Crafik's user avatar
  • 1
0 votes
0 answers
45 views

Rotating Towards the Anchor Point while Swinging

So I've been working on a Spider-Man like game for my company and I need some help with the web-swinging. Specifically, rotating in the character in the direction of the anchor point so the swinging ...
Abeer Mustafa PC's user avatar
0 votes
0 answers
42 views

Issue when making the player face the direction it's currently going

I'm trying to make the player face the direction it is going, not facing up & down but only on the X & Z axis. Currently the player keeps facing only one direction, no matter which direction I'...
Seo's user avatar
  • 11
0 votes
0 answers
14 views

How to implement 3rd person animation with acceleration from walk to run?

I am new to Unity and I am using dr Penny de Byl's lectures on Unity. I am trying to use a Mixamo character. I downloaded a character with skin as an fbx file, and also added some character movement ...
Varnika Chabria's user avatar
0 votes
1 answer
35 views

Weird behaviors with transform.LookRotation when looking at position+Vector3

I'm working on a character controller for an isometric retro shooter. However, when making the character rotate towards where they are moving, I encountered some issues. The character doesn't fully ...
Donkey45's user avatar
1 vote
1 answer
94 views

How to generate a series of checkpoints randomly along a 2D line

I was wondering how I would go about generating a series of checkpoint gates along a 2D line in my game. A bit of background, my game is a 2D reinforcement learning car driving simulator, I have a ...
Techwizard's user avatar
1 vote
0 answers
38 views

Quaternion.Euler acting weird

so I'm building up a simple arcade racing game and I was messing around with the Wheel Colliders setup. I was wondering if it was possible to add some camber adjustments in real time depending on the ...
Danilolilo's user avatar
0 votes
0 answers
17 views

Select polygon (and create submesh) by color of texture?

For a procedural unity mesh operation: What is a performant way to select polygon (and create submesh) by color of texture? Raycast hit a point on the mesh, then paint bucket search for the same ...
ina's user avatar
  • 294
0 votes
0 answers
27 views

Unity Grayscale camera but mask colors

I'm trying to replicate the example given in this thread: https://gamedev.stackexchange.com/a/185593/179264, and I was able to, but for now I want to implement the "mask" thing to 2d lights ...
crgd 23WD's user avatar
0 votes
0 answers
14 views

How to map different serverless logins (Facebook, Apple, Google Play) to one account in Unity CloudSave?

How can I map serverless different logins (Facebook, Apple, Google Play) to one Account in Unity CloudSave? Or is it automatically done when we are logging in via ...
Bogdan's user avatar
  • 143
1 vote
0 answers
59 views

How to make enemies navigate around each other in a grid-based game?

I am making a 2D top-down grid-based game where the movement is similar to older Pokémon games so it's locked to a grid. I implemented A* pathfinding for my enemies with a bool[,] that indicates ...
rossz97's user avatar
  • 11
0 votes
0 answers
34 views

What is the best lighting & shadow setup for mininal draw calls and triangles?

I have been testing out various lighting and shadow settings in Unity since during play mode the stats are showing a much higher set pass call and triangle count to what I know my model has. I have ...
FrontEnd's user avatar
  • 1,707
0 votes
1 answer
50 views

How do you make the camera not "Shake" when used with a rigidbody for 3D in Unity?

So I have no problem getting it to work with a characterController. It looks smooth when I walk/run/jump around. But I wanted to make it work with a rigidbody. There was no problem when I tried ...
MrV's user avatar
  • 3
0 votes
0 answers
27 views

Player-Environment Interaction & Collision Handling in Unity

Simply put, how would you go about designing environmental interactions? For example, upon pressing the interact button when near a chair, he can sit on it. (Also works with NPCs functioning with <...
NotLucifer's user avatar
0 votes
0 answers
50 views

Only 1 out of 3 Animator components react to trigger event

I have a main menu in which I want buttons to play an animation when they are held pressed and only fire it's "OnClick()" event when the animation ends. (So it's reset if you do not hold it ...
NationalGeographicProgrammer's user avatar
1 vote
1 answer
40 views

In Unity if you use Destroy on a GameObject and then immediately change the GameObject value, which GameObject gets destroyed?

Since Destroy happens after the update cycle, I wonder if you could accidentally (or intentionally) change what gets destroyed since you can still have code execute after calling Destroy. For instance,...
Ben Mora's user avatar
  • 467
0 votes
0 answers
13 views

How to fix UVs of spline tunnel/cylinder mesh?

I have created a tunnel using unity's spline tool. And I'm creating a custom shader for it in shader graph, and I would like to add bumps inside of the tunnel. The problem is in how the UVs, vertices ...
kyopa's user avatar
  • 131
0 votes
1 answer
48 views

Call to Random.Range() is breaking my prefab instantiation

This is for a simple sidescrolling game. I want to have it so that when an enemy is killed, it has a chance of dropping a health collectible for the player. I wrote a separate simple bool method ...
Dan Shaw's user avatar
1 vote
0 answers
26 views

Unity Animation Rigging Override Transform is not affecting rotation on startup

Given: I have animation of character arming the pistol using IK. The pistol In Character's Idle State is on the characters hip and it's barrel is looking at the floor. Next I have armed state when ...
Taras Fityo's user avatar
1 vote
1 answer
71 views

Rotating around Wall Corners while Climbing

So I've posted here before regarding a Spider-Man like game that I'm working on. I'm facing another dilemma now. I want to rotate the player around the edges of walls. So far, I've implemented a ...
Abeer Mustafa PC's user avatar
0 votes
1 answer
14 views

Selection Box Not Positioning Correctly

I found some code that generates a selection box, but when I tried it the box was not starting where the mouse was and I couldn't find the issue. ...
PizzaLvr49's user avatar
0 votes
1 answer
25 views

Trouble with NetworkDriver.Create in Unity Networking

I'm encountering an issue while using the NetworkDriver.Create method in Unity Networking and I could use some assistance. Here's the code snippet where I'm facing ...
Navid's user avatar
  • 3
0 votes
2 answers
56 views

Getting the Player to Face Movement Input on the Z-axis

I'm working on a Spider-Man like game and I've run into a problem. Whenever I'm near a wall and press the w key, the player starts climbing the wall. But when on the wall, I want it to face the ...
Abeer Mustafa PC's user avatar
0 votes
0 answers
16 views

How to update a component field for a single player for all player views?

I'm making a 2 player game in which, when 2 players are in a room, they "toss a coin" to decide which of the two player "skins" they get. Now, the way I built the player "...
Kaiannae's user avatar
  • 113
1 vote
3 answers
83 views

Unity/URP global volume with volume mask still applies effects to all layers

I simply would like to apply the Global Volume only on specific layers but I probably misunderstood how it works. Environment & Inspectors GameObject\ ...
Baro's user avatar
  • 81
2 votes
2 answers
36 views

How to ensure smooth animation when making spline longer?

In Unity, I have a Spline that I'm using to move an object. During the game, the player can add new knots to this Spline as the object moves forward. e.g if they want the object to go right, they can ...
kyopa's user avatar
  • 131
0 votes
0 answers
13 views

How to use a key to stop playing the current animation, and replay it from the beginning?

In my Unity project, I tried to use a key to stop the current animation and immediately play it from the beginning again. I also tried to control the delay before I can press again. The following ...
URORU's user avatar
  • 1
0 votes
2 answers
50 views

Can you somehow use underscore to ignore different results in Unity like you would do with TryParse?

So I may not be the best programmer, but I am not a beginner. So in C# when you want to check if... lets say if its a number or not, but you dont care about the result(the you could write something ...
MrV's user avatar
  • 3
0 votes
1 answer
55 views

How to create an infinitely long tunnel that a player is flying inside of, while letting them control the path the tunnel takes?

I'm trying to create a game where the player is flying in an infinite tunnel in first person and they can control the tunnel's path in real-time. e.g if they press D, then the tunnel should turn to ...
kyopa's user avatar
  • 131
0 votes
0 answers
27 views

2D Physics inconsistent across platforms

I want to create a black hole like gravity pull effect in Unity2D, and used that code for this: ...
CheckerT's user avatar

1
2 3 4 5
330