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

Gun Recoil C#

Hello. Can someone help me create some recoil for my guns? I have looked everywhere for a good C# script for my gun, and either it doesn't work how I want it to, or it's in Javascript. Even if I search...

View Article


SteamVR rendering a realistic red dot sight

I was curious if I could make a red dot sight realistic in unity and how to do it. Here is my idea so far in pseudo code: Raycast from gun to find hit point on wall. Move dot to hit point. Raycast from...

View Article


Trouble with Raycast shooting

When i shoot at a target it is mean to take 5 hits to make it disappear, but in stead its disappearing and all 5 notifications are appearing at once in the console and the target is destroyed...

View Article

Raycast shooting

I have a weapon firing using raycast, when i click the mouse it fires, but the muzzle flash only appears when im pointing it at a target. any suggestions as to why this happens? the shoot section of...

View Article

Gun script not working

I have this c# script that uses raycasting to shoot an enemy,. The enemy has an enemy tag and everything but it won't work and i'm not sure why. Can anyone help me figure this out? using...

View Article


Gun script not working

I have this c# script that uses raycasting to shoot an enemy,. The enemy has an enemy tag and everything but it won't work and i'm not sure why. Can anyone help me figure this out? using...

View Article

CS:GO-like recoil

Hi, I am trying to make gun spray pattern recoil like CS:GO. I was thinking maybe I can cycle through a Vector3 Array. But I Don't know how to lerp from one Vector3 to another to another I was thinking...

View Article

Gun with limited ammo?

Hello! I am testing a script of a weapon with "limited ammunition", it works that we place a quantity of bullets, when firing they are spent, and then we assign the amount of the recharge but that...

View Article


pick up ammo from specific gun?

Hello! Does anyone know how to do to collect ammunition for a specific weapon? (a box of ammunition that fills the bullets of an assigned weapon). Thank you! gun script: var speed = 10;//speed of...

View Article


Hinge Joints Interfering with each other

I'm having a problem where my hinge joints on my game object keep colliding with each other even though they are completely separate. Here's a video that makes it easier to explain (Sorry My Mic Is...

View Article

separate script to reload.

Hi. I ask them how could I do a separate script Reload ?, That is to say, place the public variables so that another script can read them and perform a function (Reload a gun with time in c#). Thank...

View Article

Pass a JS Script to C#?

Hello, I need help to pass this script to C # To add the recharge time to my weapon because in JavaScript you can not according to all, I do not know how to pass it or if there is any way to do the...

View Article

realistic reload system?

Hello! how do i can to make a realistic reload system from my script? (C#). Thanks! using UnityEngine; using System.Collections; public class Weapon : MonoBehaviour { public float Damage = 0f; public...

View Article


Total Bullets to weapon reload? Help

Hello! I have created a script that works perfectly, but there is something that is weird, The variable TotalAmmo is the number of bullets the player is towards weapon, and when reloading the spent...

View Article

Move player backwards when firing a gun. Unity 2D. Top Down

I'm creating a top down, 2D shooter and I want my player to be knocked or moved back slightly whenever they fire their shotgun to make it feel more powerful. I have no real idea on how to do this...

View Article


Problem with animations(noob question i guess)

Hello guys, i have been programming for 2 years in unity and i have not even tried to make animations in it. This is probably very noob question. Here it is: I have pistol low poly with hands and im...

View Article

Setting gameobject to null

Hey guys, So im trying to make a weapon system where the player gun pick up a weapon, the idea that i have of this is as follows. The player has a GameObject called curGun. When the player interacts...

View Article


FPS UI ammo display problem

Hey guys, So the only thing left for me to get my guns working is to display the ammo count properly, and im quite lost on this. So i have a class called Firearm and my guns all inherit from that...

View Article

How would I create a net gun?

I'm trying to create a net gun with unity, and want the net to be like a real one. And I'm like a total noob here.. so would love some help from you guys.

View Article

Multiplayer: Effects not syncing to all users

Hello, I have a problem with my gun muzzle effect not syncing across all users. The effect works and sends to clients when the server fires the gun, however when the client fires the gun it does not...

View Article
Browsing all 592 articles
Browse latest View live


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