|
|
|
0 registered members (),
631
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: crosshair problem
[Re: Espér]
#378393
07/23/11 12:16
07/23/11 12:16
|
Joined: Apr 2008
Posts: 245
GameScore
OP
Member
|
OP
Member
Joined: Apr 2008
Posts: 245
|
Hi, i was try to do this with vec_for screen but it doesnt work did you have a code sample for me maybe i forgot something or do something wrong
vec_set(crosshair,target);
vec_for_screen(crosshair,camera);
|
|
|
Re: crosshair problem
[Re: GameScore]
#378407
07/23/11 14:12
07/23/11 14:12
|
Joined: May 2009
Posts: 5,367 Caucasus
3run
Senior Expert
|
Senior Expert
Joined: May 2009
Posts: 5,367
Caucasus
|
gun.x is a view entity? Anyway, try this one (not tested):
// here is your trace
if(trace_hit)
{
vec_set(temp,target.x);
vec_to_screen(temp,camera);
panel.pos_x = temp.x;
panel.pos_y = temp.y;
}
I hope this works. Please notice that you need to use "vec_to_screen" not "vec_for_screen", read manual carefully.
|
|
|
|
|
|
|