Place model\image\sprite in constant position on screen
I am trying to place an image on the screen that will remain at a constant position regardless of player view movement. I am a 100% noob with calculating angles and all that jazz so any help will be appreciated. The overall goal is to have a image rest behind a HUD message as a background. Possible?
|
Re: Place model\image\sprite in constant position on screen
I think the best way is to build the model so it's in a position on your view and attach it.
Using a sprite would be need some calculating angles. If I'm right you have to calculate the eye position ( pev_origin + pev_view_ofs ) then adjusting to put more in left, right etc.. |
Re: Place model\image\sprite in constant position on screen
Quote:
|
Re: Place model\image\sprite in constant position on screen
Both me and stupok, tried to put sprites as if they were in the hud but with no success, when the user moves. The sprite position is always delayed. I even tried to added the vector velocity but it just make it worst. Maybe it can be achieved but I doubt it.
This is the code I was using: PHP Code:
PHP Code:
|
Re: Place model\image\sprite in constant position on screen
:(
Ty quim |
Re: Place model\image\sprite in constant position on screen
Bugsy, if you are still interested in this:
I have been playing with it more and with AddToFullpack and setting the entity movetype to MOVETYPE_NONE I managed to make it. Problems: going through ladders or barely walking with cl_bob bigger than 0 makes it move (And I doubt that it can be fixed). Still, if you want to use it in clients without speed it works fine. Edit: I mean stairs not ladders |
Re: Place model\image\sprite in constant position on screen
1 Attachment(s)
Here it goes an example. It is like a menu to chose a weapon from a list.
http://www.youtube.com/watch?v=Z9ZcC_UhFSw |
Re: Place model\image\sprite in constant position on screen
Very nice job.
|
Re: Place model\image\sprite in constant position on screen
Good work quim. You should post the code in the code snippers\tuts section for others. Or a mod can move this thread.
|
Re: Place model\image\sprite in constant position on screen
Wow that's really cool joaquim. If you want, i got a model i made somewhere that is compatible for images. I might have lost it though because I never got around to getting code to attach it to player's screens, i was planning to use it as a type of zombie infected overlay. I'm not sure if that's what your looking for though.
|
All times are GMT -4. The time now is 06:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.