Quake3World.com Forums
     Programming Discussion
        Third person crosshair functionality


Post new topicReply to topic
Login | Profile | | FAQ | Search | IRC




Print view Previous topic | Next topic 
Topic Starter Topic: Third person crosshair functionality

Grunt
Grunt
Joined: 08 Jun 2022
Posts: 70
PostPosted: 10-03-2022 01:11 PM           Profile Send private message  E-mail  Edit post Reply with quote


I'm trying to do exactly the same of this: https://streamable.com/u1wogh

The crosshair part only happens when the camera is in third person mode.
I tried to use CG_Trace inside CG_DrawCrosshair function in cg_draw.c.
I manipulated Y-axis for the crosshair, but no success:
Code:
trap_R_DrawStretchPic( x + cg.refdef.x + 0.5 * (cg.refdef.width - w),
      y + trace.endpos[2] /*cg.refdef.y*/ + 0.5 * (cg.refdef.height - h),
      w, h, 0, 0, 1, 1, hShader );

I used ZEQ2-Lite source code to look where is the feature, I'm not doing pretty well though.
Possibly, some game mod did the same, but idk and I don't have references of this stuff. BFP is the only game mod I see about.
A guy gave me a tip that the view came from the head and could be extracted from a refEntity_t variable.

I hope to obtain any help to reach this goal.




Top
                 

Grunt
Grunt
Joined: 08 Jun 2022
Posts: 70
PostPosted: 10-08-2022 03:06 PM           Profile Send private message  E-mail  Edit post Reply with quote


Yeeeeaaaah! I did it! BFP third person traceable crosshair!

https://github.com/LegendaryGuard/BFP/c ... dfb979b285




Top
                 
Quake3World.com | Forum Index | Programming Discussion


Post new topic Reply to topic


cron
Quake3World.com
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group