PivityGmodStore

Realism around the addon

Hello


If you are around here, this is to talk about realism.

I think this is important to be aware about the realism, especially about the animations.


How the trainings work


The trainings use some methods I considered the best to link the realism and the optimization, as I need to consider your servers have 100 more addons with this one.


Treadmill


As we can't override the player animations, the treadmill works by setting your player as invisible and creating a NPC with the same parameters than your player with a walk animation. Then, we speed up the rate of the animation depending on the speed the player is going at. The floor of the treadmill is also moving forward by setting a different texture on the treadmill.



Dumbbell


The dumbbell works in a different way: the animation is not set to a NPC, but on the player itself. As I didn't have a "dumbbell SWEP" with custom viewmodels, the animation is only visible in a "worldmodel" state, and doesn't really represent someone doing a dumbbell work. The animation is just here to act as you're "moving" with the dumbbell.



This is why when training with dumbbells, there is a camera showing you to see yourself in a "worldmodel" state, as there isn't a viewmodel animation;


Punching ball


For the punching ball, you're basically using your hands and just fighting the punching ball. There is no way to make it more realistic than that.


Turnstile


The turnstile is not a training, but it's still interesting to see how it works.

The turnstile comes with a set of invisible/blocking walls. When using your badge, walls are becoming non-solid until you reached the middle where the wall behind you will become solid (you can't come back) and the turnstile animation being launched, then when you passed the whole turnstile the middle wall is being solid and the other walls being non-solid. There is also a wall above the turnstile, as the idea is to make sure people are not cheating it to pass through it: the risk they face is being stuck (if your server doesn't have an anti-stuck addon) if they try to cheat on it, for example by trying to passing with a friend who verified his badge SWEP.