Use transform.LookAt with Raycast with a delayed bullet?
So I'm just wanting to create a weapon for my game, and there's 2 ways to do that: Raycasting and with actual physics. But because bullets are too fast for physics, raycast is the other option. I don't...
View ArticleGun Firing help?
Hi huys, I followed a guide on here about how to make a gun fire, and it gave me this javascript code: var prefabBullet = gameObject; function Update() { if(Input.GetButton("Fire1")){ bullet =...
View ArticleNPC Fire: Raycast or Bullet rigidbody
Hello, what is the best way to handle an NPC with fire capabilities, have it use raycast like the player or projectiles? If i use raycast, will the AI almost always have a lock on the player, or will...
View ArticleSpawn Object from list, then respawn after "used"
So I have a small script (below), that allows me to choose a prefab, spawn it on the empty game object the script is attached to, and set the period of time it takes to spawn. I need it to, instead,...
View ArticleFPS Game Hands!?!?
Where can I get a hand model for my fps game. I have multiple guns so I would like 2 separate files one with a left and and the other with a right hand. If anybody knows how to get something like that...
View ArticleHow to pick up weapons?
please help me i cant find out how to do this anywhere and been looking for days basically i want to walk up to a gun on the ground and press E and it spawns into a set location.
View ArticleMake my gun shoot as fast as I pull the trigger
Hi there community, I'm just wondering how I can change my fire rate so if I press the trigger it will shoot immediatly instead of just one time. I'm creating a sniper with 3 bulets per second. Here's...
View ArticleProblem with "if" statements
Hi. I have a problem with multiple items under an "if" statement. I want all of these to happen. Here's the code: function GunFX () { if(Input.GetMouseButtonDown(0) && canShoot == true)...
View ArticleProblem with "if" statements
Hi. I have a problem with multiple items under an "if" statement. I want all of these to happen. Here's the code: function GunFX () { if(Input.GetMouseButtonDown(0) && canShoot == true)...
View ArticleProblem with "if" statements
Hi. I have a problem with multiple items under an "if" statement. I want all of these to happen. Here's the code: function GunFX () { if(Input.GetMouseButtonDown(0) && canShoot == true)...
View Articlean object seemingly cannot access a value in other.
A drill in the game is supposed to only fire if the players fuel value is equal or greater than the cost to run it. It's strange because i've done this before, but it doesn't work for this one. anyone...
View ArticleGun Float Help: Greater Than Not Working Properly
Hello. I am making a game with a gun, and so far it's going good; with exception of one error. I have a line of code going saying if this float is less than float canShoot = false. That works, however...
View ArticleUnity c# Raycast axis stuck on one axis
I DID use transform.forward instead of a Vector3.forward, and whilst it is rotating fine on the x axis, whenever I aim up and down it won't rotate on that axis, it just sort of "slides" up and down...
View Articleragdoll force trouble
i have it so when my enemy dies it instantiates a ragdoll and i add force to it but it always goes left its supposed to be relative but its very strange this is my code for the enemy dying but it...
View ArticleFPS animations for different purposes?
I'm making a game in Unity which is an fps. Do I need to make separate animations for sprinting, walking or even jumping if the player holding a gun, melee weapon or nothing in his hands?
View ArticleFPS Gun Attached To Camera Weirdness
Hello there! I have been having a problem lately with all of my Unity FPS projects. When I attach a gun to my main camera and look up, the gun moves up too much. This also happens when I look down. No...
View ArticleFps question
So I have heard when making a FPS you can make hands or anything visible to the camera. But in the scene, all we see is just arm's and a gun. But what if I make multiplayer. How do I make it look like...
View ArticleAutomatic Shooting Script
***First off:*** **I'm from Germany sorry for my english** ---------- i've been written a Script to shoot a single Prefab. But now i want an automatic Gun. sooooo...... Can Anybody help me to make this...
View ArticleGun shot as a light ray/"Burst"?
Hello! I am on my way to make my first little game thingy. Nothing for release or anything at all, i just want to mock a bit about in unity first. So i have created a gun. A functioning gun, using...
View ArticleWrote a script for Shooting, reloading and to display the AMMO in a GUIText
This is the script, When ever I start the game It says "Assets/shoot.js(17,22): BCE0018: The name 'ammotext' does not denote a valid type('not found')" I have no Idea what to do >.> var sound :...
View Article