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.

2,464 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
17
votes
1answer
1k views

How to support Surface pens in Unity?

Our game works great with touch or mouse, but the Surface pen doesn't seem to register as a pointing device at all. How can we support the pen in Unity in a native build? This question on the Unity ...
12
votes
1answer
508 views

Oculus Rift on Motion Simulator Platform

I currently develop a VR environment for an existing (physically) large motion simulator platform. The user can sit on this motion platform and gets accelerated and tilted to induce the feeling of ...
10
votes
3answers
3k views

Preventing a Combination of Rigidbody Jump Force & Bounce Magnitude in Unity3D

I'm building a fairly simple marble racing game in Unity3D. The ball is a 3D physics object that moves only on the X and Y axes. It has the ability to roll left and right, and to jump. Pretty basic ...
10
votes
1answer
1k views

How to save the Mesh from an Interactive Cloth at runtime in Unity?

At the start of a scene I have GameObject called 'sheet' positioned above a 'ball' GameObject. The sheet has an Interactive Cloth component on it and a Cloth Renderer. The Mesh for the Interactive ...
8
votes
0answers
127 views

Why Can't I duck reverb on the mix bus in Unity?

i'm surprised there is so little documentation on this issue. But i'm trying to duck the audio on all the mix buses in Unity so that you can clearly hear the VO of the game. Now it works great except ...
8
votes
2answers
2k views

Creating a curved mesh on inside of sphere based on texture image coordinates

In Blender, I have created a sphere with a panoramic texture on the inside. I have also manually created a plane mesh (curved to match the size of the sphere) that sits on the inside wall where I can ...
7
votes
0answers
139 views

How to move a portion of bezier/spline curve along its complete bezier/spline curve?

Based on the image below, I have a curve (orange) which is a bezier sub-curve of an original curve (longer black curve). The original curve consists of a number of cubic bezier curves joined together. ...
7
votes
0answers
138 views

How to create an illustrator/photoshop-like pentool for creating bezier curves in Unity

I found a very useful bezier curve creation code here, which I am using. I need to create complex segmented bezier curves so I want update the code to create illustrator/photoshop-like pen tool bezier ...
7
votes
2answers
1k views

Displaying text on a 3D plane

I am busy with a pet project where I am trying to create a Collectible Card Game in 3D. These cards have Hp and Damage etc. but I cannot find a way to neatly display these values. I tried to use a ...
7
votes
4answers
4k views

Can I use two Collision Boxes on the same GameObject?

I have two Collision Boxes on the same GameObject. I don't want the Collision Boxes to be triggers. I want the Collision Boxes on the actual GameObject, not its children. For example, if I want to ...
7
votes
3answers
787 views

Why do prefabs speed up loading?

I have a scene with a massive terrain. It took a long time to load (approximately 60 seconds) when I pressed play. I am in the editor. I prefabbed it. Now it only took about 5 seconds to load when ...
6
votes
1answer
348 views

How can I Implement spin in billiard game?

I'm not sure that you played billiard or snooker before.if you played you should know about spin. but anyway if you don't know about it you can see it in this video I want to Implement spin like this ...
6
votes
1answer
267 views

Adding functionality to make individual anchor points of bezier continuous or non-continuous

I am creating bezier curves with the following code. The curves can be extended to join several bezier curves by shift clicking in the scene view. My code has functionality for making the whole curve ...
6
votes
1answer
606 views

Instantiating prefabs by dragging in scene not working

So I have this problem where I try to instantiate prefabs as in this video for example. I can take instantiate one prefab to the scene, but if I try to instantiate a second one to the scene (whether ...
6
votes
1answer
390 views

How to rotate a parent object while rotating a child object to a certain angle using coroutines

I have a semicircle like game object which I made by putting two arcs in an empty game object (SCircle) and rotating the 15° (for left arc) and -15° (for right arc) as seen below. ...
6
votes
2answers
5k views

Handling movement on sloped surfaces - clamping character to sloped surface

I've noticed that a lot of people seem to have this issue but I've yet to find an actual working solution - when a rigidbody-based character controller (I'm not using Unity's character controller) ...
6
votes
1answer
9k views

Sending RPC calls from server to client inside Unity

In my game inside Unity, I have two scenes setup. One for the main server ( acts like authoritative server ) and the other scene for my client. The game starts once my client connects to the server. ...
6
votes
2answers
725 views

Aligning pathfinding to the center of tiles?

I'm looking to achieve tile by tile movement in a project I'm working on. I employed the use of the asset Simply A* Path-finding to allow a unit to navigate the terrain. Since the tiles are simply ...
6
votes
2answers
840 views

Use both AddForceAtPoint and change velocity property?

I'm using Rigidbody2D for some game objects. It seems that when I AddForce() or AddForceAtPoint(), the game objects are mostly ...
6
votes
2answers
6k views

Unity - Water Cube (to 2D game)

I wonder if you can create a cube of water within the unity! I'm starting to use the Unity, and took a sought as to whether there was already something like this ... but have not found any tutorial ...
5
votes
0answers
144 views

How to set the camera projectionmatrix so that it's 4 rays always exactly hit the corners of a defined plane?

I have a camera, and I have a plane. The plane has 4 corner points. I need to find out how to change the projection-matrix of the camera so that the projection-rays of the camera always hit the ...
5
votes
1answer
132 views

Interpolating between positions unfeasible at 30 frames per second?

I am working on a 3D platformer in Unity and I am targeting Android devices. The game consists of a lot of objects smoothly interpolating from the bottom of the screen to the top. This whole time I'...
5
votes
0answers
71 views

How can I make Unity run fast when it's not focused?

I'm using Unity3D. I have an automated test suite that takes 1-2 minutes to run. When Unity has focus, these tests seem to run at least 2x as fast as when Unity is in the background. But, it's very ...
5
votes
2answers
167 views

unity / blender — positioning items / clothes on character

I'm aware that in Unity, when you want to add (e.g.) a weapon to a character, you parent it to the "hand" bone of the character etc... Well I'm trying to add a hat to a character in unity when it's ...
5
votes
1answer
132 views

Locking or overriding game object scale property coordinates in inspector window

I want to know if it is possible to lock or override the X and Y coordinates of the scale property in the inspector window so that changing one coordinate immediately changes the other and scrubbing ...
5
votes
1answer
1k views

Unity: Player Gets Stuck Between Tiles

I am creating an endless game, which constantly spawns tiles. The problem is that after a few tiles the player gets stuck on random tile and stops moving. I noticed this problem even when i was ...
5
votes
1answer
335 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 ...
5
votes
0answers
270 views

How to force play area corners to Lighthouses in Unity

I'm working for a guy that wants to recreate real environments in VR and superpose them for business demos. Think of one of those mall kiosks where you "enter virtual reality" and at first it looks ...
5
votes
0answers
3k views

How do I make the PS4 controller vibrate in Unity3D on mac?

I am currently working on a 2D game in Unity3D with an option to play with a gamepad/controller. I would like the PS4/dualshock 4 controller to vibrate. I am on mac. I have looked into Xinput but I ...
5
votes
1answer
1k views

Unity Capture And Display Live Camera Feed

I want to display the video using the device camera on specific part of the screen on iOS, android and Editor. I was able to find the WebCamTexture which display the camera video on the Quad (3D ...
5
votes
1answer
2k views

Unity 5.3.5 - How to setup a lobby with general game settings?

I am currently working on the lobby for my game. I have followed these tutorials (https://www.youtube.com/watch?v=jklWlm5v21k), which were very helpful, and was able to setup my lobby like this. The ...
5
votes
2answers
516 views

Gun Rotation Unity

https://www.youtube.com/watch?v=m-J5sCRipA0 - this tutorial by brackeys shows how rotate your 2d gun using your mouse. How can I edit this script to add an auto rotating system. Where the gun keeps ...
5
votes
4answers
700 views

2D Animation based on Time.deltaTime has problems when the game performs long operations

I animate my 2D sprite using the Update() method: ...
5
votes
0answers
2k views

Unity3D LLAPI and Pyhton UDP communication

I need a Unity3D game on Android to receive UDP packages from a Python script running on a different device. Using System.Net is not (yet) an option, as it is only supported on Android with a valid ...
5
votes
2answers
3k views

Can't clip a sprite that has a custom shader in NGUI

I am using NGUI. I have an "NGUI Unity 2D Sprite". This sprite has a material with this shader: ...
5
votes
2answers
14k views

Screen record in unity3d

How to do screen record in unity? I want to record my screen(gameplay) during my running game. That should be play/stop , replay , save that recording on locally from device, open/load from my device (...
5
votes
1answer
453 views

Problems with Raycasting Requirements

Im working on a script which kinda works like an Enemy AI. Its kinda like a detection system with requirements that are required to be met. This is a recent question i asked using my code Raycast ...
5
votes
1answer
1k views

Avoidance Steering Behavior acting inappropriately

I've been trying to implement this steering behavior in Unity: Understanding Steering Behaviors: Collision Avoidance However, I'm getting strange results. Here's the code for the script, feel free to ...
5
votes
1answer
2k views

Input.GetAxis(“Horizontal”) not updating

I'm having trouble with Unity's basic character controlling. After i implemented the crouching in the code below the Input.GetAxis("Horizontal") does not update (while the left control is pressed (...
5
votes
2answers
551 views

How can I add a glow effect around a pair of wings in Unity without post processing?

Basically I want to use post processing and then I found a tutorial to achieve my goal. However, the artist want a pure shader to achieve this, without any C# script hanging in the main camera. Any ...
4
votes
0answers
138 views

Unity3d: calling a web service in unity editor works, but not in standalone. Why?

I have this line of code: SDE3D _webService = new SDE3D(); int result = _webService.UserLogin(txtLoginUsername.text, hashString); My ...
4
votes
0answers
110 views

In unity, making a navmesh for a tiny planet?

I'm trying to build a scene in a small planet, and baking will always give me the result on the half top of the planet. But what I want is to create a navmesh all around the small planet. I am ...
4
votes
1answer
306 views

Is there any way to detect cpu/battery temperature on Android 7.0+ platform in Unity?

I tried WeTest but it's not working because my test device is Android 8.1. Also, I tried Emmagee however it's just working on Android 6.0 and below. Is there any other thing?
4
votes
0answers
111 views

Is it possible to capture screenshots in headless (no graphics) mode in unity?

I am trying to capture screenshots while running unity simulation in headless mode (no graphics), if anybody tried to do the same and it worked, please share how could you make it work.
4
votes
2answers
318 views

2.5D platformer how to darken building edges?

I was wondering how I could go about creating a vignette type effect / some sort of volumetric shadow for the 'cross section' parts of a 2.5D level. The effect I'm going for can be seen in 'This war ...
4
votes
0answers
187 views

Moving directional light cause huge fps drop: why?

I've implemented a simple script to simulate Sun Rotation (day/night cycle). In my "Update" i Rotate main Directional Light (the sun). What i've noticed is that my FPS dropped from 60 to 20-25 fps. ...
4
votes
1answer
115 views

How can I rotate the game stage (Unity 2D)?

I have a pseudo-game which I'm developing in 9:16, to be displayed in vertical screens. The client now needs another version in 16:9, rotated in 90º. I tried creating a empty object, puting all my ...
4
votes
0answers
211 views

Networking and physics

Context I have been implementing my own networking for a third person multiplayer game, but controls and physics will be ala old school FPSs. I'm using Unity's transport layer, which allows me to ...
4
votes
1answer
938 views

How to get a good Force Feedback .dll Feedback for Steering Wheels? || How to access Force Feedback without a .dll?

I want to implement a steering wheel with Force Feedback to my game and I encountered this problem: I couldnt do it with performance. I have found a .dll for that online, but it had issues like: It ...
4
votes
0answers
225 views

How to animate an arc from the middle in both directions

I have been able to make an arc that animates from one end to another using the following coroutine: ...