I've been searching everywhere and haven't found any solution to this problem, or mention of it. Anyway....
I've been learning how SWEPs have been working lately (specifically for TTT), and one thing I haven't found anything on how to change the position and the scale of the viewmodel.
Say a viewmodel is too big and bulky and you want to scale it down and move it somewhere else, or vice versa. I haven't found a way of doing this. I am aware of bones mods (and the SWEP construction kit) and that does not seem to work in TTT (probably because TTT has no code in dealing with bone mods).
This is what the viewmodel will look when not using ironsights, you know what it looks like normally.
Also
[LUA]
SWEP.SightsPos = Vector(1.406, 0, -1.206)
SWEP.SightsAng = Vector(0, 1, 0)
[/LUA]
seem to have no effect and I do not know what that does either.
Any help on this matter would be appreciated.
Using SCK should work on TTT if the server allows custom-coded weapons. Step-by-step, it would be something like:
1. Use SCK on a model to change it however you like and copy the changes (scale, position, etc.) to a text file.
2. In your custom-coded weapon, you have to add the SCK base code found [URL="https://github.com/Clavus/SWEP_Construction_Kit/blob/master/lua/weapons/swep_construction_kit/base_code.lua"]here[/URL] into the Swep's Lua file.
3. Paste your changes to the model that you put in a text file from earlier and place it in the Sweps' Lua file as SCK explains to.
4. Test and repeat.
Good luck.
Thanks for the base code, I shall read that thoroughly
Also is there a way to modify the viewmodel without bonemods. Much like how ironsights modify the viewmodel.
If you can find it, there should be an "invisible texture" in Garry's Mod that the Material tool uses. If you can find it, you can apply it to the weapon's model and it should be "gone".
Alternatively, [URL="https://www.youtube.com/watch?v=r2IVlytbqe4"]this[/URL] video should tell you how to make an invisible texture by yourself.
No I want the viewmodel to become invisible, just be able the manipulate its position and its size. I understand bonemods does this but is there a way to modify the viewmodel in its entirety, like one position and angle vector.
That would require breaking down the model, importing into a 3D model editing program, changing the scale, exporting it, and rebuilding the model into a usable format.
It's either that or change the bonemods.
If you would like to try re-making the model, I'll be more than glad to help.
Ugh, i would have thought at least to be able to change the position since ironsights do exactly that, but modifying the actual sounds like a pain to me, though probably not that hard. Eh oh well.
Or maybe there is a way and neither of us (or no one) know what it is.
Sorry, you need to Log In to post a reply to this thread.