2 registered members (VoroneTZ, AndrewAMD),
779
guests, and 7
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
precise_shot.wdl - new version
#111355
02/07/07 20:52
02/07/07 20:52
|
Joined: Jul 2002
Posts: 2,002 Europe
ShoreVietam
OP
Expert
|
OP
Expert
Joined: Jul 2002
Posts: 2,002
Europe
|
Little script for Ego-Shooters to have more precise shots on animated models than with c_trace. Right from the beginning, disadvantages: 1. You have to check every vulnerable entity since you have to pass an entity pointer. 2. You have to know the amount of bones of each model (should not be the problem with humans(-like) models only). Demo program: trace.exe - Selfextracting WinRAR archive (~1.39 MB)precise_shot.wdl ~ file
Last edited by ShoreVietam; 02/08/07 18:36.
|
|
|
Re: precise_shot.wdl
[Re: ShoreVietam]
#111356
02/08/07 11:18
02/08/07 11:18
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
Thanks a lot, Shorevietam! This is great... One thing I noticed: Is the white flickering light the place it'll hit? Or does it just show if it will hit? In either case, if I put the crosshair right between two joints, like the knee and the foot, there's no flickering light. Does that mean I wouldn't hit if I'd shoot there? Sorry if I missed something... Thanks for contributing this! Micha
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
Re: precise_shot.wdl
[Re: DLively]
#111359
02/08/07 18:30
02/08/07 18:30
|
Joined: Jun 2006
Posts: 2,640 Earth
Germanunkol
Expert
|
Expert
Joined: Jun 2006
Posts: 2,640
Earth
|
If you animate a character, aparrently c_trace always looks at his first frame only. So if in the first frame there's a leg at a certain place, but now he's walking, and the leg's somewhere else, it would still hit the player, unless you do some updating ever frame. (am I right?... or did I misunderstand something?) This system is a new way of tracing so that the player's hit in the right way even when he's not in his first frame, but playing an animation.
~"I never let school interfere with my education"~ -Mark Twain
|
|
|
precise_shot.wdl - new version
[Re: DLively]
#111360
02/08/07 18:35
02/08/07 18:35
|
Joined: Jul 2002
Posts: 2,002 Europe
ShoreVietam
OP
Expert
|
OP
Expert
Joined: Jul 2002
Posts: 2,002
Europe
|
Exactly Germanunkol! This is a function that "traces" each Bone of a model to enable precise hits for ego shooters. This maybe is the final version; improvements: - Better calculation of the TARGET - vector - returns distance to shot-origin - returns hit-bone-number (to detect headshots ect.) - shot-direction does not have to be a normal vector (length doesn't matter any more) - example how to use it in combination with trace to detect walls that are in the way. New demo program including "precise_shot.wdl": trace.exe - Selfextracting WinRAR archive (~1.43 MB)
|
|
|
|