Hello again, after a long time I have come back to ask you for help with this. I recently opened a thread on the official
GitHub page but I haven't received any response yet.
I really hope that I can receive any help on this topic, regardless of whether it can be achieved in the end or not.
For those who have not yet understood, I summarize them:
- I create a custom entity (I assign its respective model, its origin, etc...).
- I link it to the player in question (pev->owner).
- I assign the player's view to this new entity (pfnSetView/PF_setview_I).
- On each entity think I take the v_angle of the player and assign them to the entity.
- If I rotate my camera sideways (right/left), everything works fine, the "gun" is aimed fine.
- If I point my camera up -> the player view will also point up (this is fine) BUT -> the entity model will point down (this is wrong).
- If I pointed my camera down, the same thing happens as in the previous case but in reverse (player view is pointed down -> model points up).
In conclusion using the code I left above, an issue occurs when you aim down and/or up with the "gun" (it's just a simple model, and the same thing happens regardless of the model; I even tried the chick.mdl and the same thing happened).
Here are some pictures for better understanding:
Default camera position
Pointing up (the model "goes down")
Pointing down (the model "goes up")
I look forward to your responses. I think that if this can be solved it can be a great method to customize weapons, I hope so.
Excuse my bad english, I use the translator.