Hello,
I am currently producing a sort of hook pistol that will allow say a police officer to pin a car to the ground or even to another car, sort of like towing a car. However i have an excellent modeller producing the pistol with two separate models, the hook and the pistol itself.
I am having an issue because im not quite sure how to make the hook retract back into the gun, do i do this via an animation in blender? Or can i pinpoint the position of the gun in real time and slowly retract it back into the pistol?
Im not exactly new to LUA / GLUA but im new to SWEP's and STOOL's so please bare with me :D
You could make hook its own entity and draw a rope in between the muzzle and the edge of the hook. Then you can just retract it by moving the hook toward the muzzle of the pistol until its close enough where you can remove it.
[QUOTE=code_gs;52304752]You could make hook its own entity and draw a rope in between the muzzle and the edge of the hook. Then you can just retract it by moving the hook toward the muzzle of the pistol until its close enough where you can remove it.[/QUOTE]
I currently have a prototype where i have done that exact thing but my only issue is targeting the muzzle of the pistol. Is it as simple as targeting the SWEP itself? And also when retracting it, would it be too server-intensive to set the position closer to the player in a SWEP:Think() function ?
I believe the PLAYER:GetShootPos() function automatically goes to the muzzle of the weapon they are holding ( and the eyes if they don't have any )
[QUOTE=solid_jake;52304914]I believe the PLAYER:GetShootPos() function automatically goes to the muzzle of the weapon they are holding ( and the eyes if they don't have any )[/QUOTE]
Ohh thanks! perfect, ill give it a go!
Edit 1:
Using GetSpootPos() doesn't work as it directly targets the eye position, i guess this is used for crosshairs.
Sorry, you need to Log In to post a reply to this thread.