Answer by _xXJuanXx_
Something along the lines of setting the rotation euler angles to the rigidbody's velocity vector, can't remember. Good thing I can point you to a script that does exactly that!...
View ArticleAnswer by _xXJuanXx_
I found this. Not my script though so make sure to give credit to that person: https://github.com/CaseyB/UnityCardboardTrigger
View ArticleAnswer by _xXJuanXx_
You need to use a Raycast (Physics.Raycast), using values from [the Camera class's ScreenPointToRay function][1]. The raycast function will return a RayHit, so just assign it to a variable and do...
View ArticleAnswer by _xXJuanXx_
Everything in the script checks out, so I suggest for now attach that script to an empty cube, and add a plane ground. This is because I noticed in the video, those pre-made object have some scripts on...
View ArticleAnswer by _xXJuanXx_
Whenever you get a Null reference error (or any error, in fact) the script will stop and any code after the error will not run. Check the console and fix EVERY error (or add try/catch statements). The...
View ArticleAnswer by _xXJuanXx_
Calculate the average (i think) of the x and y velocities of the rigidbody that is moving ( `heading = (yourRigidBody.velocity.x + yourRigidBody.velocity.y)/2` ) That, I believe, is how you calculate...
View ArticleAnswer by _xXJuanXx_
use `Screen.currentResolution` to get the screen resolution in a sort of weird vector2 format ( so `Screen.currentResolution.height` for the height instead of `Screen.currentResolution.y`. Weird, I know);
View ArticleAnswer by _xXJuanXx_
This isn't a request website, it's a programming help website. Go to https://reddit.com/r/gameassets if you want to try to request a free one, or try the Unity Asset Store if you don't mind paying.
View ArticleAnswer by _xXJuanXx_
You are moving the camera using it's Transform, and you have locked the rotation in the RigidBody. I suggest either applying the rotation to the RigidBody (terrible idea), or storing the rotation you...
View ArticleAnswer by _xXJuanXx_
You can create a vary basic free website using GitHub. Follow the steps on https://pages.github.com to make a site. For this purpose, you won't need to worry about making an actual website, as long as...
View ArticleAnswer by _xXJuanXx_
Recreate your prefab as an empty, which has your 3D model as a child. Rotate the child (the 3D model), not the parent (the empty), how you want, and then use a prefab of the whole thing as your bullet.
View ArticleAnswer by _xXJuanXx_
Xamarin, in my opinion, has the best auto-complete and syntax highlighting in any IDE I've ever used. You may need the official unity plugin for supporting multiple solutions (Ie, when you have custom...
View ArticleAnswer by _xXJuanXx_
Right now, you're defining a single instance of the EnemyHealthManager script in your start function. Not only will this exclude all health-diminishing functions to one instance, It also won't work if...
View ArticleAnswer by _xXJuanXx_
First, create two variables, a float which will represent the delay you want (in this case, 10) and the other will be a timer, whose value we will increase every frame. In the Update() function, add a...
View ArticleAnswer by _xXJuanXx_
If it's not a pixel art game where you can have perfect circles, use a spot light. Since it's 2D, just have it pointing down the Z axis. If you'd like, you can also add a [Cookie texture][1] to add...
View ArticleAnswer by _xXJuanXx_
Compile errors have nothing to do with animators, only with scripts (unless you're crazy enough to modify the built-in Animator component script, in which case, ...why?) You'll be more likely to get a...
View ArticleAnswer by TheShadyColombian
It might be a bit overkill, but you might want to take a look at [NavMesh][1] which when used with a navmesh agent, will let it avoid obstacles, all you have to do is set a destination, and the navmesh...
View ArticleAnswer by TheShadyColombian
One robust way of doing this is creating a float timer that you add deltaTime to during update, sort of like this. timerActive is a bool that is true when you want the timer to go. void Update () { if...
View ArticleAnswer by TheShadyColombian
I parented it to an empty and made an animation that started with the rocket at the rocket launche height, and decreased to the ground, and I put a nav mesh on the empty that is at floor level.
View ArticleAnswer by TheShadyColombian
Switched to nav mesh and set drag levels if the rigid body to infinite
View Article