Answer by Downstream
You need to calculate the direction components, normalize them and then add a force to that vector, whose strength is defined by the inverse-square law: var intensity = 5.5f; components =...
View ArticleAnswer by Downstream
You're rotating it at approximately 3214 degrees per second. :) [That method of the Rotate-command takes two parameters][1], axis and angle. You have the two confused. transform.Rotate(Vector3.left, 45...
View ArticleAnswer by Downstream
Use transform.RotateAround? You get the position from the object you're rotating around and the axis from one of its facings (i.e. transform.forward)....
View ArticleAnswer by Downstream
Well I just solved my own problem by reimporting with: AssetDatabase.ImportAsset(path); (There will be lag.)
View ArticleAnswer by Downstream
Do you want it to be like skeet shooting? In which case you need to add a rigidbody to your plates, then use Vector3.AddForce(transform.forward * strength) after instantiating. Shooting them could be...
View ArticleAnswer by Downstream
Does this answer your question: http://answers.unity3d.com/questions/585035/lookat-2d-equivalent-.html
View ArticleAnswer by Downstream
I think you're not supposed to increment individual variables of a transform position. C# gives an error if you try to do that. Try increment transform.position with another Vector3.
View ArticleAnswer by Downstream
Raycast works by taking a vector from a position and checking if there's a collider in the path of that vector, basically like a bullet. You can then use the data in the raycasthit variable type to do...
View ArticleAnswer by Downstream
So I used ILSpy to open UnityEditor.dll and found the method the editor uses: UnityEditor.ImportRawHeightmap -> ReadRaw Hopefully I can adapt this for use at runtime..
View ArticleAnswer by Downstream
So I used ILSpy to open UnityEditor.dll and found the method the editor uses: UnityEditor.ImportRawHeightmap -> ReadRaw Hopefully I can adapt this for use at runtime..
View ArticleAnswer by Downstream
Sorry, I didn't check my reference answers. To do that, transform.LookAt also takes a plain Vector3 as the first argument, then you need to set the y-value of that vector3 to equal the height, y, of...
View ArticleAnswer by Downstream
I would suggest you go view the live training or basic tutorials first. This sort of task will be trivial to anyone who's viewed them. Basically you want a script with an update function that takes the...
View ArticleAnswer by Downstream
@uveritegames Well this code works fine for me, and it shows whether I hit anything in the scene view (be sure to change the tag name). using UnityEngine; using System.Collections; public class...
View ArticleAnswer by Downstream
Here's a script for getting started. using UnityEngine; public class RayCaster : MonoBehaviour{ public int answer = 4; int numstart; public void Start(){ numstart = (int)KeyCode.Alpha0; } bool...
View ArticleAnswer by Downstream
/*@iubisoft Basically you have to calculate the angular velocity of the planet and the angular velocity of the ship in relation to the planet. Here's my test script which I used to calculate it. It's...
View ArticleAnswer by Downstream
@zak666 You're using == on line 46. It's a comparison operator, it doesn't set the value. Whenever something basically ends up "orphaned" in the script it returns this error, here you have a lone...
View ArticleAnswer by Downstream
@F14M3THR0W3R Seems like you have rigidbodies on your wheels or something if they fly off. You only need a rigidbody on the parent car object. There was a long post about cars and stability somewhere,...
View ArticleAnswer by Downstream
@jevans70 An empty scene is about 6kB so I suppose that's how much you'd save not using scenes. I wouldn't invest the effort into saving that, keeping in mind how much scenes can help with organizing...
View ArticleAnswer by Downstream
@OcDGamer98 It seems specific to your GPU, I noticed another question where you were talking. It's best to submit an issue via the tracker.
View Article
More Pages to Explore .....