Gun not smoothly following player,How to make gun smoothly follow player
So I am making a 3D game on unity and I want my pistol to move with the camera smoothly and not just attached to the camera. I'm not really sure how to explain it properly but what I mean is I want...
View Articlehow can I trigger my animation through script?
I just have a simple gun setup and I want to a recoil animation. I have made the animation that simply rotates the gun upwards and downwards quickly however I don't know how to trigger it through...
View ArticleHow To Add Knockback To Player Once Gun Fired In 2D?
Hey Guys, so for a couple of days i've been trying to add a knockback to the player once the gun has been fired, i have no idea how to do it, I've tried a couple of ways but it doesn't work Here is the...
View ArticleHow Do I Add Knockback To Player Once Firing Gun In 2D?
hey so, for a couple of days i've been attempting to make a knockback to my player once the gun is fired. I can't get it to work, here is the code for the gun: using System.Collections; using...
View ArticleRaycast origin random
My raycast's origin is randomly moving up and down randomly so my gun script is inconsistent. Can someone help me with this? using System.Collections; using System.Collections.Generic; using...
View ArticleHow to remove recoil when not shooting?
Two days ago, I added a simple recoil to my camera when I shoot my guns. I added this to my MouseLook script(I'm using the standard assets' FPSController) : float yRot = sideRecoil +...
View ArticleUsing Quaternion.Slerp with VR motion controllers?,Using Slerp with VR Hands?
I am trying to add a Slerp rotation to my gun when pressing the trigger button on my vr controller since animations do not work with a rigidbody. My goal is to add recoil. However, when I am slerping...
View ArticleBullet moving back and forth between player and random position.
Whenever I instantiate a bullet it glitches and starts moving between the player and a seemingly random position.![alt text][1] [1]: /storage/temp/163307-20200713-1344.png
View Article.enabled = false not working
I am extremely new to Unity and coding in general and I am making a game with a grapple hook in it. The grapple hook activates but does not disappear upon releasing the button. I have tried using...
View ArticleGun not moving on the Y axis,,Problem with gun not moving on Y axis
Basically i followed Brackeys FPS movement video, i wanted to make it a shooter so i made a gun object and parented it to the main camera. That led the gun ONLY following on the X axis and not on the Y...
View ArticleMy animation barely moves with root motion.
Hi Guys! Right now I am working on a 2d shooter game, where the gun follows the mouse rotation and I made a "recoil" animation for my gun. It's plays every time when a shot fired, but unfortunately if...
View ArticleHello there!! So when i hold LMB its continuously makes the gun noise but i...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class GunShot : MonoBehaviour { public AudioSource someSound; void Update() { if(Input.GetButton("Fire1")) {...
View Article3D Side Scroller Gun PickUp
Hello everyone! i am currently working on a 3D Adventure Side Scroller Game Called "The Adventure of A Cube". The game is basically about you as a cube having a plane crash, thus needing to survive and...
View ArticleFPS Gun Hold
So I'm trying to make a fps game and I'm trying to make my hand hold the gun, but I've never use animtion rigging before. My hand is a child to my hand, so it cant move as the camera looks around up...
View Articlehow i add "recoil" to my crosshair,How i do the crosshair go up when shooting?
i want to add to my crosshair that when i shoot it goes to the sky, like in fps games, please help. my gun script: using UnityEngine; using System.Collections; public class Gun : MonoBehaviour { public...
View ArticleUnity animating moves from past frames
Hi guys! I literally have no idea how to explain this or search this up so thats why my title makes no sense, so basically, I am making a reload animation for my pistol, but when I move my left arm to...
View ArticleI've been trying to make a gun script, but somehow the boolean to tell when...
So im trying to make a gun script, and this is the script that is attatched to the bullet. My issue, is that when the bullet hits an enemy, it does not set "hashit" to true. It does detect the...
View ArticleHow can i add knockback to the player when firing my shotgun? (3d)
,im trying to make a game where when i fire my shotgun the player gets knocked back backward or upward depending the direction he's facing please help me !!! also here is the script that im using for...
View ArticleAutomatic Shooting Script
I am shooting by mouse fire 1 button but i want my player attack to enemy automathic without any press button. How can i write script about automatic shooting gun please help my code is using...
View ArticleMY effect dont destroy
using System.Collections; using System.Collections.Generic; using UnityEngine; public class bulletController : MonoBehaviour { public float moveSpeed = 20f, lifetime; public Rigidbody rb; public...
View Article