#Shitty H3VR
1 messages · Page 1 of 1 (latest)
Finished pistol completely, component based system is able to turn it into another weapon like an assault rifle with no coding effort
If you have a pistol or a replica around, you will notice it all works the exact same. I'm really happy about that
But the pistol itself isn't too impressive. The point is to designa component based weapon system that will allow to make any weapon system in the world with high interactability.
That glock is made up of a magwell, a reciever, and a slide. The reciever has no knowledge of the other components and they all act independant of eachother, so you could theoretically swap out that magwell for an ammo belt and have a belt fed glock. Good stuff.
Visuals are still pretty scuffed, I'll get around to it
AK in action
Still a bunch of things to fix like the magwell action, some magwells require taking out the magazine by hand while others have a button, kinda forgot that
A few data issues like the 7.62 spitting out 9mm casings, but that's very minor
oh and... 
How I forgot that, I don't know
Very cool!
Boltie working
How the bolt locks on certain axes is way simpler than I thought.
void SetSlideZ(float z) {
float back = transform.localRotation.eulerAngles.z == upRot ? backZ : fwdZ;
transform.localPosition = new(transform.localPosition.x, transform.localPosition.y, Mathf.Clamp(z, back, fwdZ));
}
void SetSlideRot(float rot) {
float down = transform.localPosition.z == fwdZ ? downRot : upRot;
transform.localRotation = Quaternion.Euler(transform.localRotation.x, transform.localRotation.y, Mathf.Clamp(rot, down, upRot));
}```
If it's not forward, the most the bolt can go down is all the way up (not at all)
If it's not all the way up, then the furthest back that it can go is all the way forward (not at all)
Dunno, thought that would be more of a pain. Always a pleasant surprise when you write some simple code and it just twerks.
I was thinking of adding a sort of resistance to the bolt, where if you are pulling back on it while it is in the rotating stage, it will rotate much less.
Similarly, trying to push it down while the bolt is moving back and forward will make it move a lot less.
I say this because VR bolt actions are super easy to use, you just kind of diagonally move the bolt back and then forward in a flicking motion, super quickly,
With that, you will actually need to do the motion of up, back, forward, down (with some leeway, of course) which should make it a bit more challenging.
What do you think, my imaginary devlog audience? 🎤
Lighting, will change
Children's scribbles
retexture to fit theme
Gonna model some magazines for a bit then return to coding shit
Is this a feature? I think it would be cool to have like an extension thing that converts the wrong ammo into the gun and have it work
Ha, no. I just forgot to check against the magwell type.
I won't be doing an ammo conversion thing, partly because it would cause massive clipping issues when I actually render the cartridge inside of the chamber.
But there will be plenty of customization, don't worry. The whole idea is that you start with a bare reciever without even a barrel or magazine and you work your way up from there.
I hope to give function to all of these attachments in the next few days.
My friends
I cook
- The long front sight with the wire is a gas block. If you dunno how guns work, its basically what provides gas to the gun so it can automatically load the next round.
- The other weird, illegal looking device is an automatic fire control group. It replaces a bunch of internal parts of the gun to make it full auto.
That's just simple stat changes though, what I'm really happy about is the fact that attachments can be self contained, you can assemble parts of the gun without the receiver. All stats will be dynamically updated every time something is added or removed.
I really like how the attachment system is coming along. Everything is so compartmentalizes that adding new weapon systems is a matter of integrating maybe one more script for behaviours that aren't done yet (Like belt fed ammo, for example)
Damn bro this post could be a whole portfolio
It looks really great. You should add hands or smt
Useful
Shitty AI finished, it patrols, chases, and shoots at you, then breaks off if you go too far
I was hoping to have more than that in 2 days but whatever, it'll do for a first attempt.
I'll come back later to expand on the AI, including cover, combat tactics (suppression, rushing, run n gun, etc), communication, and more
Gonna add a backpack and body inventory slots now