Answer by Flynn
Okay... Player.PlayerObj = GameObject.Find("Player"); Since GameObject.Find() will not return an error if no object was found, this is not causing the error. Since assigning any variable, even a null...
View ArticleAnswer by Flynn
This is a truly strange one! Before I go any further, it is important to note that the type of array you are using is not native to JS. It's actually a Unity3D tack-on! (From C# .NET, SEE:...
View ArticleAnswer by Flynn
The two ways to do this are: A: IN the import section, turn "Generate Colliders" on. B: Select your object, click COmponent > Physics > Mesh collider (Thanks for the save there, syclamoth, edited...
View ArticleAnswer by Flynn
Event listening in programming is very interesting, and there are many different approaches. The way Unity does it is less event listening, and MORE event describing. The class MonoBehaviour all ready...
View ArticleAnswer by Flynn
THat requires maath lol. You would need to get into a lot of polygon math in order to define custom shapes for your spawning "area" A simple solution would be way easier, you just need to make a...
View ArticleAnswer by Flynn
If I get you correctly, you are just clicking sync and then looking in your IDE. I successfully used Mododev for debugging in Unity in the past, but it was quite a while ago, and I'm afraid I cannot...
View ArticleAnswer by Flynn
Use tranform.InverseTransformDirection(dir); To convert local directions to global coordinates. For example: rigidbody.AddForce(tranform.TransformDirection(inputVector * MoveForce), ForceMode.Force);...
View ArticleAnswer by Flynn
Any changes done while the game is playing are undone when the editor stops playing. Make sure you add your scripts while the editor is not playing
View ArticleAnswer by Flynn
For simple rotation, definitely just write a script. Animations themselves are backed by far more complicated scripts that deal with interpolation types, beziers all kinds of things, as well as reading...
View ArticleAnswer by Flynn
**TL;DWR:** ***Use AddTorque without considering what point on the object you are applying torque at. This is the physically correct way to do it, and is equivalent to Lockstep's solution, except that...
View ArticleAnswer by Flynn
Mathematically calculate your rotation based on speed: float rotX = (verticalSpeed / maximumVerticalSpeed) * 45 IF the object is traveling downwards at maximum speed, this will return -45. It will...
View ArticleAnswer by Flynn
var testing : Test = new Test(); This goes into memory handling in code -- There are two types of variables, basic variables, and objects. Basic variables are ALL either a number type (float, integer,...
View ArticleAnswer by Flynn
There is a slight trick you could use: For simplicity, let's say we have a cube with a script with an int value. It is from a prefab. We have two prefabs in the scene which are exactly the same, wit...
View ArticleAnswer by Flynn
Physics.Raycast does not take a rotation, it takes a direction. (1, 0, 0) is a direction that points in the X axis direction, but is not rotated 1 degree on the x axis. (0.5, 0.5, 0) would be a...
View ArticleAnswer by Flynn
Okay... Player.PlayerObj = GameObject.Find("Player"); Since GameObject.Find() will not return an error if no object was found, this is not causing the error. Since assigning any variable, even a null...
View ArticleAnswer by Flynn
This is a truly strange one! Before I go any further, it is important to note that the type of array you are using is not native to JS. It's actually a Unity3D tack-on! (From C# .NET, SEE:...
View ArticleAnswer by Flynn
The two ways to do this are: A: IN the import section, turn "Generate Colliders" on. B: Select your object, click COmponent > Physics > Mesh collider (Thanks for the save there, syclamoth, edited...
View ArticleAnswer by Flynn
Event listening in programming is very interesting, and there are many different approaches. The way Unity does it is less event listening, and MORE event describing. The class MonoBehaviour all ready...
View ArticleAnswer by Flynn
THat requires maath lol. You would need to get into a lot of polygon math in order to define custom shapes for your spawning "area" A simple solution would be way easier, you just need to make a...
View ArticleAnswer by Flynn
If I get you correctly, you are just clicking sync and then looking in your IDE. I successfully used Mododev for debugging in Unity in the past, but it was quite a while ago, and I'm afraid I cannot...
View Article