Answer by Benproductions1
This may not be the answer you are looking for, but it might be helpful anyway. Unity is extremely good at hiding special features for networking. If you open a server on a certain port, Unity...
View ArticleAnswer by Benproductions1
How about using 2 random numbers one for magnitude, which would be between the 2 radii and one for direction (angle) which would be between 0 and 2pi. Then you can use sin/cos to get the x and y...
View ArticleAnswer by Benproductions1
Please post questions properly, more than 1 line would be nice :) Before answering the question I would like to make you aware of the speed of harddrives. What do you think would happen when an object...
View ArticleAnswer by Benproductions1
Since you asked a question that doesn't adhere to the requirements when asking a question, I'll answer it improperly as well. Since a computer system can theoretically do anything, when you take out...
View ArticleAnswer by Benproductions1
I'm not going to do it for you, but heres what you do: Pick a random number from 0 to the number of players -1. Then make the player with that index is the player picked. If you can't follow that,...
View ArticleAnswer by Benproductions1
Hello, I have previously used pygame and I can tell you... EVERYTHING is easier in Unity. If you want things to have random colors, you can just change the color of the material they use to render, or...
View ArticleAnswer by Benproductions1
Hello, The reason for the error is that name is not part of `Rigidbody` In Unity, `name` is only part of a `GameObject`, but your object is of type `Rigidbody` and therefore has no `name` component. If...
View ArticleAnswer by Benproductions1
Hello, When you are trying to access the `GameObject` your script is attached to, you need to put it in lower case: `gameObject`. It's the difference between accessing a recipe and a cake following the...
View ArticleAnswer by Benproductions1
Hello, Your error is due to you trying to call a variable as a function. In your Update function you call `transform()`, but `transform` references the `Transform` component of the `GameObject` your...
View ArticleAnswer by Benproductions1
Hello, When calling an RPC tagged function, Unity implicitly tries to pass another variable, after the other arguments, of type `NetworkMessageInfo`. This both contains a `timestamp:float` of when it...
View ArticleAnswer by Benproductions1
Hello, Your problem is that `myTimer` will never directly equal `0`: Lets say it's very close to `0`, at `0.05` and you have very bad framerate, so your delta time is `0.06`. After your code is run,...
View ArticleAnswer by Benproductions1
Hello, Since your question is so broad, I'll just give you a just as broad answer :) One solution would be to make a timer, every time the timer reaches or goes below `0`, you shoot and reset the...
View ArticleAnswer by Benproductions1
Hello, No It can't. But you can emulate the behaviour using more bones :) Hope this helps, Benproductions1
View ArticleAnswer by Benproductions1
Hello, Why not, instead of using physics and writing a script to randomly generate force on the rigidbody of the lantern, why not just create a lantern, rig and animate it. Then you can have *wind*...
View ArticleAnswer by Benproductions1
Hello, Animations in Unity are hierarchical, meaning that they don't work only off object names and such, but also their location. For instance you have 2 objects: "foo" and "bar". bar is a child of...
View ArticleAnswer by Benproductions1
I can't be bothered reading your code, since it's unformatted, but if you want to comare 2 values in an array at the same index: //if index is of type int and array1/2 are array/lists/hashtables...
View ArticleAnswer by Benproductions1
Hello, Since Unity uses UDP, and the UDP header is quite large in data, most of your data you'll be sending will be in the header of the packets, not the content. Therefore the difference between an...
View ArticleAnswer by Benproductions1
Hello, It's hard to tell what you want to do, but if you want to transform a point from local to world space, you can use `referenceObject.TransformPosition(point:Vector3)` to make your point relative...
View ArticleAnswer by Benproductions1
Do a google search, find your answer, come back, watch the tutorial video, read the FAQ, apologise to all the people, whose time you wasted asking useless questions that can be answered by google....
View ArticleAnswer by Benproductions1
Ok, So in the line where you call `GetComponent` you are assigning the return value to a "variable" with the same name as the class. You can't do that! You can't reuse the same names for different...
View Article
More Pages to Explore .....