Get weapon bullet start origin where that Muzzleflash sprite appear
Hello everyone!
As the tittle says ... i want to create some new shooting effects but in order to do that i need to know how to do that what tittle says :) Well here is image: http://www.upload.ee/image/4062987/asd.png Part of me remembers that it was somehow possible yet i cant remember how and i dont know how to search it because i dont know what is the name of that thing i want. Thanks! |
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
I use this for tracer:
PHP Code:
|
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
that code wont work for the model in image.
Also it is not cs1.6, it is css :) |
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
Quote:
Quote:
Spoiler
|
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
That's something that can be half-done. To get the exact position of it's attachments, it is not possible that easy. You can get an entity's attachment with engfunc(EngFunc_GetAttachment, ...) providing the right params.
There's something that you can try, but it is just an idea, because there are some math calculations involucrated. You can create a entity on precache, set it's model and angles to 0.0-0.0-0.0, set it's model to the weapon's v_ model (yeah, v_ model) and use the function related to get it's attachments. Then, you will have the origin of the attachment and the angle to the attachment starting from the middle of the model. Don't know if this math guess will work, but "try" to use angle_vector(...) with the angle gotten, and scale the vector result by the len of the origin gotten. Add the scaled vector to your eye position, and try an effect to see if that was accurate. |
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
try searching on russian forums. Somebody has posted something similar years ago
|
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
It is not hard to get the origin where muzzleflash appear, the problem is where it gonna appear.
This weapon have 2 muzzleflash origin and detecting which one will appear when i shoot is hard. I guess this is impossible and i should trash my idea. |
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
I guess it depends on the CSW_*
|
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
It's a model handled by the client, and anyway, you can try to guess a point by doing some random tests, but having the exact attachment position seems to be not possible.
I'm going to test what I said and going to tell you what happens. |
Re: Get weapon bullet start origin where that Muzzleflash sprite appear
Quote:
|
| All times are GMT -4. The time now is 09:38. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.