Quantcast
Browsing all 90 articles
Browse latest View live

Understanding what Time.time is doing

Can someone explain this line to me `nextPossibleShootTime = Time.time + secondsBetweenShots` So it seems like the gun will be fired if CanShoot() is true, and if time.time is not less than...

View Article


A Blinking Turret?

I set up a turret that shoots at the player and has a temperature meter that can change color when the player gets to close. How could I go about getting the temperature to change from green to a...

View Article


Health Bar doesn't scale evenly with damage

I was trying to make a health bar for my character and I have a model that scales on the x axis whenever the player takes damage but, it doesn't scale evenly. How could i fix this? Is it easier to just...

View Article

Target lost once player is instantiated

I have a character that is reinstantiated whenever he gets attacked by turrets, but once he dies and I respawn him, the turret loses its target and they just stay motionless. How could I set the...

View Article

Death animation followed by explosion

Been at this for a while now and was wondering if anyone had a good idea as how to do it. I'm trying to destroy the enemy bot and when he dies, I want him to collapse to the ground and THEN explode. At...

View Article


Changing the rotation of mechanim animation

A character that I have, has a mask layer on the mechanim for a shoot animation, but when he shoots, he shoots 45 degrees to his left instead of straight forward. I want to have it so that when he runs...

View Article

Mouse cursor only hides on half of the screen

I was using this to get rid of the cursor for a top down game, but the cursor is only hidden for half the screen. If i put the aspect ratio to "Free Aspect" then the mouse is hidden for almost the...

View Article

Trying to respawn/instantiate player after death

I don't know if this was the best method, but I set these two scripts up so that when the player died, you could press a button and respawn him at a certain spot. It worked before, so i'm not sure if...

View Article


Animating Dragon with legacy animation system

I was trying to animate a dragon with the legacy animation system. And i'm having a couple problems. I want to have the animation crossfade into idle, if its not in an animation, but I can't get him to...

View Article


Trying to Lerp Multiple lights

I was following the stealth tutorial from unity and I tried adding a lerp to all the camera lights when the alarm goes off, but I get the error `Assets/Scripts/CCTVPlayerDetection.cs(64,88): error...

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


Understanding what Time.time is doing

Can someone explain this line to me `nextPossibleShootTime = Time.time + secondsBetweenShots` So it seems like the gun will be fired if CanShoot() is true, and if time.time is not less than...

View Article

A Blinking Turret?

I set up a turret that shoots at the player and has a temperature meter that can change color when the player gets to close. How could I go about getting the temperature to change from green to a...

View Article


Health Bar doesn't scale evenly with damage

I was trying to make a health bar for my character and I have a model that scales on the x axis whenever the player takes damage but, it doesn't scale evenly. How could i fix this? Is it easier to just...

View Article

Target lost once player is instantiated

I have a character that is reinstantiated whenever he gets attacked by turrets, but once he dies and I respawn him, the turret loses its target and they just stay motionless. How could I set the...

View Article

Death animation followed by explosion

Been at this for a while now and was wondering if anyone had a good idea as how to do it. I'm trying to destroy the enemy bot and when he dies, I want him to collapse to the ground and THEN explode. At...

View Article
Browsing all 90 articles
Browse latest View live


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