Here is the first iteration of my Weapons Template (Formerly known as “Physical Bullet Template”).
My goal was initially just to make physical bullets work reliably, but that quickly turned into this weapons template. Now my goal is to make an easy to use weapons template that will allow you to quickly set up hundreds up weapons, all that act and perform differently.
Here are my high level goals:
-Firearms-Standards (Reloading, recoil…)
-Realism (Ballistics, condition…)
-Melee Weapons (I have yet to think about these features)
-Bullets-Physical
-Standard(Ray)
-Hybrid(Rays and some calculations)
-Weapon related functions-Weapon swapping
-Other various things I see get asked a lot
There are instructions for use and more information in the text editor.
Don’t hesitate to voice any questions, concerns or suggestions. I’m very open to ideas, and constructive criticism is encouraged.
I think it’s pretty cool. Would it work with a high velocity projectile from a grenade launcher so it could stick to an enemy and blow up later? That’s my favorite type of weapon, one that the enemy knows will kill them but they can’t do anything about it.
Also it would be awesome if you could shoot a long bullet into a wall so that when it stopped you could see the bullet protruding from either side of the wall and then do a quick boolean operation to make “real” physical holes in the wall from the bullets shape, and then just end the bullet object. But I suspect that would lag the game real bad if you could even do it at all.
Right now it works quite well up to around 700 m/s then the ray trace seems to stop detecting the wall. Which is weird, but i’m sure it can be fixed. even if it cant 700 m/s is pretty fast like 2296.59 feet per second which is well in the range for most guns muzzle velocities.
EDIT: ^Fixed the problem i was having now its reliable at even higher speeds.
About the bullet holes maybe with some texture trickery it would be possible but you cant currently modify meshes in blender.
That’s a bummer about not being able to modify meshes in game. So you would make this just like a real bullet? Would you be able to set objects that you WANT the bullet to go through, like cardboard for instance? That would be neat along with having the bullet go down as gravity pushes it. I’ll be waiting for a .blend!
Honestly, I think it’s mainly a learning experience.
There is little point in having bullets as physics objects. They don’t look good and they don’t work right without hacks. So you have to raycast and move them manually, why not just use bare raycasting system to begin with? It’s the standard solution in FPS games for a reason.
Projectiles in general that would benefit:
slow motion mechanics
“bullet hell” type games with slow/evadable bullets
arrows
rockets
throw spears
throw axes
long distance sniper shots,
as you have to predict movement (wind, moving obstacles (like birds) between targets)
angry birds
…
I think it’s useful, especially when shot projectile is not a bullet form 10 m distance.
And a rain of arrows/ axes is quite pretty to watch.
I really enjoy ranged weapons in Mount&Blade.
I heard the sound of fun physics scripting and came running. What’s goin’ on here then? =o
A full-on weapon template sounds like a great idea! I’m pretty sure the Source engine uses something like this. All those slightly different weapons must share some underlying mechanics.
Sorry its been so long, I’ve had less time to work of this then I would like to have. But no excuses I’ve been working on this when I can find time to, and just wanted to let everyone know that I’m still trucking along. I hope to have an actual update later this week, and perhaps a demo file showing the current progress and how you can set it up in your project.
My goals are to have this as easy to use as possible while still being extremely versatile in what it can do, so that you can easily and quickly set up any weapon you want with any ballistic properties, and customization(Attachments) you want.
Here is what I currently have checked off (These may still change but the basic underlying code is there):
Physical Bullets
Base Weapon
Base Firearm
Shooting
Based on RPM that is set for the weapon
Fire modes
single
semi-auto
burst (number set by you)
full
I’m currently working on reloading and magazines, and I’ve also been doing some experiments related to ballistics that I’ll talk about in a later update. So hopefully later this week when I’ve finished a few more items on my list I will post another update to this thread that I will include a blend file.
I just wanted to let everyone know there won’t be any update this week, I’m still working on it but I had some stuff come up that slowed me down quite a bit. Anyways I’ll update you again next Friday!
Hi GTVPO, yes it is free to use just make sure to give me credit. I am going to upload a newer version in a couple of days that has a few more features if you want to wait for that. Also thanks for the interest:)