Quantcast
Channel: Latest Questions by Fox-Handler
Browsing all 90 articles
Browse latest View live
↧

Stealth tutorial Camera Script Very Confused

I was wondering if anyone could help explain some of this script to me. Up until now, my understanding has been fairly decent, but this camera script has thrown me for somewhat of a loop. At the...

View Article


When is it allowed to reassign a variable?

Hi, i've been having trouble with this concept from the beginning. I've seen scripts in which people will use a variable and then reassign it. When are you allowed to do that, and when is it not...

View Article


Finding the Angle for Enemy Ai

I was trying to find the angle of the AI for a script, and I just want to know if my knowledge is correct. If you find the cross product/normal of the angle (the forward vector and the vector to the...

View Article

transform.lookAt More info then needed?

if(Mathf.Abs(angle)

View Article

The Last Element in an Array?

if(wayPointIndex == patrolWayPoints.Length-1) { wayPointIndex = 0; } I've almost finished this tutorial and I have a quick question about the above code. It says that if the `wayPointIndex ==...

View Article


Sound effects stuttering when player dies?

I've been trying to finish up the stealth tutorial , and for whatever reason whenever the player dies, the siren sound effects stutter and the alarm lights do not go off. I even went as far to replace...

View Article

Smarter AI Searching for the Player

I've been trying to set up the enemy Ai to take the player's last known direction and use that for a way to check specific waypoints in the level depending on what that last direction was. Does anyone...

View Article

Check player's position once per Second?

what would be the easiest way to check the player's position once per second. Vector3 PosPerSeconds() { posSeconds += Time.deltaTime; if (posSeconds >= posSecondsTimer) { newCurrentPosition =...

View Article


Finding the closest waypoint

for the NavMesh, how would you find the closest waypoint to the player's current position?

View Article


The SqrMagnitude for Input

I've seen this line `speed = new Vector2(h,v).sqrMagnitude;` used a couple times for the parameter in mechanim, but I'm not really sure what it's doing. Could someone explain to me what its doing...

View Article

Quaternion FromToRotation Confusion

I know this one line is pretty self explanatory, but i'm having trouble understanding the order it's placed in Quaternion referentialShift = Quaternion.FromToRotation(Vector3.forward, CameraDirection);...

View Article

Quaternion multiplication

I was studying this script from an example project and after comparing it to another tutorial, did some research on Quaternion multiplication. Now I am by no means a math whiz (only learning what I...

View Article

Dragon Tablet Y88 USB Debugging Drivers

I've been trying to use the Unity Remote on a tablet I got a while back, but google's USB driver's are not working for it. Is anyone familiar with this model? I'm not sure if I should put in the effort...

View Article


Constraining rotation to only the Y Axis

I was trying different bullet patterns for a shooter game, and noticed that the rotation on the Z axis has problems when there is movement on the player using a rigidbody,so the bullet patterns...

View Article

Mathf.Infinity

Can someone explain how Mathf.infinity is working in this script? The script is supposed to turn an instantiated bullet towards the closest target, but I can't really tell what Math.infinity is...

View Article


transform.eulerAngles Flipping a character

Hi, I've been learning about this script for a few days, and I ran into something that is kind of confusing. It has to do with this line right here. // Face Direction float moveDir =...

View Article

Separating Player Input from Player Behavior

I was attempting to organize these scripts a little better by separating the input and behavior of the character into two scripts. It works alright until I actually try to set up the raycast and...

View Article


Instantiating a Ragdoll for use in another script

can someone tell me the difference between this Ragdoll R = (Instantiate (ragdoll, transform.position, transform.rotation) as GameObject).GetComponent(); R.CopyPose (transform); Destroy...

View Article

Destroying the cloned gameObject

How could I find the name of the cloned gameObject that is instantiated so I can destroy it after a certain amount of seconds? using UnityEngine; using System.Collections; public class Entity :...

View Article

Basic Vector calculations

In this top down game, I have the player changing his rotation based on where the mouse position is, however I'm having a hard time understanding this line of code right here. targetRotation =...

View Article
Browsing all 90 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>