46
Help / Re: Fire from inside the muzzle?
« on: April 27, 2018, 08:22:08 PM »All this package does is allow 1) Multiple projectiles to be fired at once without additional coding for each weapon (like a shotgun) and 2) has the player's velocity affect the bullet velocity, like say, for example, if you're in a vehicle and shoot straight forward or if you're falling you won't fall past your own bullets
You can get bullets to fire from the back of the weapon by using %obj.getEyeVector() instead of %obj.getMuzzelPoint()
A raycast projectile isn't really a projectile and is just a light of sight check. Raycasting weapons use containerRayCast() to see if there's any objects between point a (the player) and point b (the maximum range of the weapon) and if the raycast finds a player in that line of sight, it damages the player and/or spawns an explosion manually, completely bypassing onProjectileHit().
From what I can gather your hitmarker add-on probably packages onProjectileHit() and as does Slayer. For compatibility it would be ideal to do a raycast and, instead of manually damaging the player or spawning an explosion, would be spawning a projectile literally inches from the player with the same properties. Most weapons don't do this as it requires a bit more coding and calculation and might cause a bit of lag on a server with a bunch of projectiles flying about and hitting stuff.
Topic belongs in modification help
Whoops. :(
But while we're here, I wanted tell you that I switched out the bit of code you told me to. Now the bullets don't appear? To be specific, I went to where it says InitialPosition and switched it there. Gonna keep tweaking stuff, but I just wanted to let'cha know.