C# is a multiparadigm, managed, garbage-collected, object-oriented programming language created by Microsoft in conjunction with the .NET platform.
-2
votes
0answers
19 views
Can't create elevator using waypoints in Unity3d
I have a script for waypoints, which I find here. It works fine for objects, which move on the horizontal axes. But it don't move objects up and down. Can't understand, why.
Elevator are just ...
0
votes
1answer
20 views
Rotate Camera around GameObject in Unity
Using Unity 5's new touch system, how can I rotate the camera around an object using touch detection, or "swipes"? I can do this using earlier versions of Unity, however the more recent version, Unity ...
0
votes
0answers
18 views
Delegation in unity C#
I have a game where I have balls bouncing and you shoot them. Since I need a way to end the level when the player shoots all the balls I though I would create a game controller script which will ...
0
votes
1answer
20 views
Unity 5 How Do I Set Text of Text Component of Input Field
How do I set the text of the new Input Field's Built In Text UI Object in Unity 5+?
myInputFieldText.text = "Text Value I Want";
The code above does not work to set the text inside of a ...
1
vote
0answers
27 views
Tile Map Shader?
I'm trying to write a shader in unity that will take tiles from a sprite sheet and draw them onto a tile map.
I'm new to shaders so this might be totally wrong, I think it might just be a math error ...
2
votes
1answer
59 views
How to correctly draw a line in Unity
I'm working on a game which requires me to draw a few lines from a single point that is more formally said
Given point A with coordinates x,y I draw n lines where the i-th line has the coordinates ...
0
votes
1answer
72 views
OpenGL: Draw an arrow
I'd like to know how to draw an arrow to represent a vector position, length and direction.
The issue is that I can't quite find an easy way to know the location and rotation of the triangle ...
0
votes
0answers
38 views
.NET Unreal Tournament Bots [on hold]
I want to develop AI bots in a 3D game environment using C#. There have been several initiatives to do just that within the Unreal Tournament engine. Unfortunately, none of these are maintained ...
1
vote
1answer
34 views
OpenGL why point's size stay the same while zooming/unzooming
i'm currently working on a game engine for a college's project. While implementing some debug tools I came across a little problem. When i'm drawing point on the ModelView Matrix the point's thickness ...
0
votes
0answers
43 views
How to get the position of a moving object
I need to get the position of the moving game object.But when I run the below code I always get the same position.
public Vector3 position_store;
void Update() {
...
1
vote
1answer
36 views
How can I refactor an enum so that it is still available in the inspector?
I am trying to use an enum so that it is available in the inspector. This code works:
public ArmorTypeEnum ArmorType;
public enum ArmorTypeEnum { Light, Medium, Heavy };
How can refactor it into a ...
1
vote
3answers
59 views
Learning To Use C# In Both VisualStudio And Unity's Monodevelop Frameworks
I apologize if this has been asked and answered, but I can't find it. I know the framework is different in MonoDevelop and Visual Studio 2010 Express. For instance, if I want to use Write.Line, I ...
0
votes
1answer
82 views
How to animate objects with bobbing up and down motion in Unity?
I have created a 2D platform game with Unity and C# where I have collectable items that can be picked up by the player. What I want is to give the items more focus by having them bobbing up and down.
...
1
vote
0answers
48 views
How do I Animate a character in Unity3D (Animator)?
first of all, I am new to Programming and Unity, but I want to create a simple game with Unity3D. I am using the StandardAssets (character) where all animations are included, but I dont get how to ...
0
votes
0answers
17 views
unity plugin for android (failed to receive dispatch signal error in logcat)
i m trying to make a unity plugin for android. The plugin will show the native android dialog box when clicked on a button in unity. But when i click the button an error arises in the catlog and ...
0
votes
1answer
39 views
Fast mesh collision 3D (C# XNA)
I'm trying to write a simple program where a 3D landscape can be walked about with a basic camera. However, I've found it very difficult to do even simple collisions with my terrain. I'm wondering if ...
-1
votes
0answers
36 views
Game Server Framework [on hold]
I already looked all over the internet, but couldn't find a straight up answer.
I've developed a game for iOS devices with handling tcp/udp connections using the native library (NSStream). The only ...
0
votes
0answers
21 views
Unity3D Interactive Cloth Basketball Net Falling Apart Though Not Tearable
I have a basketball net mesh attached to an Interactive Cloth with the following attributes:
The mesh is not segmented and is not marked as tearable but as soon as the game starts the net falls ...
1
vote
0answers
26 views
MonoGame 3.3 Font loading
Is there any way to have fonts in game without making a separate Content Project and adding a .spritefont file in the new 3.3 Monogame? You can now load other resources directly from the Content ...
0
votes
1answer
33 views
Create a continuous flight path on a Bezier Curve in Unity3d
I am working on a game in which a butterfly is flying along some path.
What I am trying to do currently is create a Bezier curve starting from the butterfly's position(previous curves end point) and ...
0
votes
0answers
77 views
roll a ball unity 3d
I am learning Unity3d following book "Game development for iOS with unity" by Jeff W. Murray from 2012. Roll a ball game project.
I am stuck here:
using UnityEditor;
using UnityEditor.UI;
...
1
vote
2answers
42 views
Position problems instantiating lasers at the sides of a space ship
I'm developing a demo of a 3D Space Ship game concept in Unity, just for learning purposes.
I have a cube representing my space ship in the scene, and a laser prefab that is instantiated at the 2 ...
0
votes
2answers
25 views
MonoGame Point filtering movement appears Choppy/Jerky
When you move a sprite that is drawn using point filtering with a decimal number, example : 0.1 pixel or 100 * deltaTime (1.6) the movement appear choppy/jerky because it jumps from pixel to pixel. ...
0
votes
1answer
27 views
How to change the speed of the gameobject moving on the itween path
I have set an itween path for an object to move.And I have written the code as
iTween.MoveTo(gameObject,iTween.Hash ("path",iTweenPath.GetPath("train"),"time",300));
The above code is working for ...
0
votes
1answer
109 views
How to procedurally generate Mountains that Looks more natural
My Terrain was looking a bit plain so to freshen it up a bit I decided to add mountains to the terrain generation. Unfortunately the Mountains don't look very natural with the surrounding terrain.
...
0
votes
4answers
113 views
Assign each player a unique ID?
For my game's multiplayer matchmaking and back-end, every player is assigned a unique GlobalID and LocalID. The GlobalID is used for keeping track of all players and the LocalID is for keeping track ...
0
votes
1answer
69 views
Unity - Proper use of threads with procedural generation
I have been working on a simple chunk based terrain generation system, with voxel octrees. The overall method works pretty well, but testing this system with large amounts of chunks completely freezes ...
0
votes
2answers
57 views
How to implement levels in unity
My game is very simple and runs on a single scene.
I would like to add different levels with different difficulties. Currently looking at 10-20 of those. What is the best way to implement this? A ...
0
votes
0answers
12 views
How create a platform with multiplayer games? [closed]
I'm a junior developer and i'm trying to build a games platform where there are a lot of multiplayers games and where is simply add games and play with everyone.
I started building a simple card game ...
0
votes
1answer
18 views
Spawning moving text make it disappear overtime
I am trying to display a text when I click the letter 'R'. When the text appears, it should slowly slide down on the y axis only, slowly disappear over 4 seconds and get disabled.
I am not able to ...
1
vote
0answers
39 views
How to implement a professional fighting game input buffer?
Ok guys, I understand how to make a basic input buffer.
Here is my code:
public class InputBuffer : MonoBehaviour {
public int max_buffer;
public enum keys { down, up, left, right, X, Y, ...
0
votes
3answers
56 views
How to move an object to a position?
I'm trying to move an object to the coordinates 48.7, 51.07, 102.8, but it does not move. I did some test to make sure that "OnMouseDown" works, and it does, I think it could not be finding the object ...
0
votes
0answers
13 views
I want to swap textures on button click [duplicate]
public class Textswap : MonoBehaviour {
public Texture imageone;
public Texture imagetwo;
private Texture gametexture ;
void Update (){
if(Input.GetMouseButtonDown && gametexture ...
0
votes
1answer
25 views
XNA - debugging
I know how to debug step by step in XNA however when I do that the screen is gray and the console does not give out any output. This is a problem because it greatly limits my ability to find problems. ...
0
votes
0answers
19 views
network programming [closed]
I want to Design a client/server chess game.
and I want to determine in my design as shown below :
The data that will be sent between the client and server to update the chessboard game.
The steps ...
0
votes
0answers
20 views
GameObject.Find(String); cannot be accessed with an instance reference? [closed]
I'm at a game jam, and our coder bailed. I'm a UX designer with basic scripting skills but this is my first time using Unity so please bear with my ignorance.
We're trying to make a FPS game where ...
0
votes
1answer
64 views
The camera in a 2D tile based side scroller is moving slower than the player
In my 2D tile based side scroller, I want a camera that scrolls in the x direction, but not in the y direction. The world is separated into three zones; one on the left and one on the right where the ...
0
votes
0answers
42 views
faster way to select data from a pool instead making many if statements? [closed]
Hi I'm using a script where when the uses choose ones of 500 options (IE, profiles), the program will then load up the data tied to that profile (ie, name / age / etc / many catergories)
right now ...
0
votes
2answers
42 views
Jumping Script not working
So i have made a simple jump script with an misfiling boolean but it just does not work, it always stays on isFalling = true, here is my code:
public class PlayerController : MonoBehaviour {
...
0
votes
1answer
65 views
How to show a popup with text when a game object is selected?
We're building an FPS game where you walk around a 3D environment and walk up to objects, click, and then a GUI message pops up.
Basically, I've got a character, walking around in 3D space, and is ...
0
votes
1answer
46 views
Error when sending webrequest from Unity
I'm trying to submit a form made in unity via WebRequest, but i always get a 404 error. I even wrote a C# WinForm that also submit a form and it works. Do I need to do something specific in Unity for ...
1
vote
0answers
68 views
How do I implement realistic recovery from weapon recoil?
I want to create an equation determining how fast a gun recovers back to its center after it has fired. I have a weapon system functioning based on constants (recoil amount, bullet spread, etc.) ...
0
votes
2answers
52 views
How to rotate a gameobject to the specific angle
I have tree model that is being rotating .After certain angle it should stop rotating.I have done a sample code.But the tree is not stopping.
void Update () {
//transform.Rotate ...
0
votes
1answer
57 views
How can I implement triple buffering using Direct3D 9?
I am creating an application using Direct3D 9. I want to implement triple buffering with vsync. I can successfully create a graphics device object with 2 back buffers. How do I know which buffer to ...
0
votes
3answers
62 views
Strategy for keeping a primitive facing the viewport?
Using XNA, c#.
I'm writing a stellarium-type of program-- well, trying to :-) -- and I have a 'sun' texture that I'll be pasting onto triangle primitives. I'll also be floating some text above each ...
1
vote
1answer
103 views
Apply shader to only a part of a sprite
I'm trying to make an image blur when a transparent image overlays it, I am wanting it only to blur the section that is being overlayed. So if half of the original image is not being overlapped, that ...
0
votes
0answers
65 views
Loading different navmeshes at runtime in Unity 5
In order to improve the extend ability of our maps, we load different components of the map at run time. The idea is a user can use Unity to make a map, drop it into a folder and it will be loaded.
...
0
votes
1answer
73 views
Unity5 TextAsset not functioning in WebPlayer
Preface
I am working on a 2D Platformer in Unity5 utilizing TileMap techniques. I have a working system to read "Room Tile Data" from JSON files with the Unity TextAsset Class and the Newtonsoft ...
0
votes
1answer
99 views
How can I make player move on array of GameObjects in Unity?
I am making a board game where the players hit a dice and move on an array of GameObjects according to the number they got.
So I declared a Gameobject array and added to it all the objects I need.
...
0
votes
0answers
39 views
XNA/C# Shadows look strange in orthographic
I have implemented shadows in to my game engine. They look fine when rendered in projection mode as a projected light, however I get a strange "blocky" look when they are put into orho'. I will be ...