Quantcast
Channel: Questions in topic: "gun"
Browsing all 592 articles
Browse latest View live
↧

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 Article


Gun 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 Article


NPC 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 Article

Spawn 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 Article

FPS 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 Article


How 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 Article

Make 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 Article

Problem 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 Article


Problem 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 Article


Problem 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 Article

an 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 Article

Gun 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 Article

Unity 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 Article


ragdoll 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 Article

FPS 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 Article


FPS 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 Article

Fps 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 Article


Automatic 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 Article

Gun 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 Article

Wrote 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
Browsing all 592 articles
Browse latest View live