The aiming happens procedurally with cframe math.
Even the bobbing, swaying works perfectly fine while also taking the scale into account.
And for the scaling of the viewmodel I use the new model scale API:
It looks to me that the camera is phasing trough the model a little bit which causes some parts of the gun to become invisible or cut. I don’t know how to fix the model weirdness while aiming. Any help is appreciated, even small leads, or things to research on.
p.s. i posted in scripting support because i think thats the issue…? im not sure, maybe its the model texture or appearance or that stuff (which i clearly do not understand)
@dthecoolest is most likely right. it seems to be a problem of the viewmodel being too small, so the camera has trouble rendering it. try scaling it slightly larger.
heres some reading by egomoose which should address your problem.
What ego moose is doing is exactly what I’m doing. Taking the scale in consideration while offsetting.
Even with a little larger scale, the aiming gets better but then the clipping resumes bit by bit, is it just better to take that. Considering players probably won’t always hug walls?
i think that may be the best you can hope for unless you want to use viewport frames, which i dont reccomend (bad lighting and stuff). the problem is that
too small->clipping into camera
too large->clipping into wall
you may have to just strike a balance in between that.