I want my shooter to be like Fortnite Chapter 1 where most of the weapons are hitscan but some like the Sniper, RPG, etc, are Projectile. I was wondering how to implement the two and I was told to use tags to seperate them but I thought, what if I do what the Roblox Endorsed Weapons kit does which is that they have a set value for the bulletspeed and if you increase it to a crazy high value it can simulate a hitscan while still using projectiles as bullets. Is this a good way to implement it or should I really just use tags?
I don’t really think theres bad or good ways to implement ideas in general. I would say tags would be just fine here. I don’t know if I am understanding your solution correctly or not, but your idea is basically simulating a tag-like system anyway, but with scripts only. I would personally go with tags though.
Also, I thought fortnite moved away from hitscan weapons…?
Tags could do the trick, but you could use ray casting for both.
On a projectile bullet, cast a ray from the last position to the current position every frame/physics step, and using the results, find the hit humanoid and deal damage to it.
Same with Hitscan, except you just cast a single ray.
Also, instead of using a tag, you can have a “bullet part/model” for projectile weapons, so if a weapon doesn’t have one, it will cast a single ray instead of firing the bullet model.
Okay yeah I feel that’s def a good idea thank you bro. Something that sucks is that I’m taking a step away from guns rn because yes I learned how to make guns and a little bit of OOP but I never actually made a game using things like datastore or buttons so I’m working on a 3d side scroller to build my skills up for those intermediate games like gun games (and also to just build a name for myself)
Yeah but Chapter 1 had hitscan and only snipers and stuff were projectile. People prefer hitscan it seems and I want similar gunplay to Fortnite
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.