View previous topic :: View next topic |
Author |
Message |
ajay

Joined: 29 Oct 2004 Posts: 295 Location: Swindon, UK
|
Posted: Tue Jun 08, 2010 5:23 pm Post subject: Weapon Models |
|
|
Is there anything special a model needs to show up as a weapon model. As an example, and not as what I'm doing, if I took a mdl of a chair and wanted it to be a melee weapon, what might stop it showing up, does it need anything special information or positioning etc?
cheers
me _________________ my site |
|
Back to top |
|
 |
frag.machine

Joined: 25 Nov 2006 Posts: 728
|
Posted: Tue Jun 08, 2010 5:30 pm Post subject: |
|
|
Just the correct origin/angles offsets, the rest is business as usual. Check all occurrences of, say, "v_axe.mdl" in vanilla source for more details on the QuakeC part. _________________ frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/ |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Tue Jun 08, 2010 6:14 pm Post subject: |
|
|
needs specific positioning.
it'll be placed at the player's origin, basically. it'll bob up and down a bit so won't be exactly there, but should be on average. it'll move forwards and back a bit as you look up and down.
less obvious things are that anything closer than 4 quake units to the view will be clipped, and so you will need to position it sufficiently far away from the origin such that the entire model will be visible.
Make it too far away, and it'll clip into walls.
(glquake has a depth hack where the depth of the viewmodel is scaled down by 3, I'm not quite sure on the maths, but keep the model between 4 and 36 units from the origin, I guess (actually, towards the middle of that range due to bob/pitch).
I don't remember which axis the model needs to be on, but it cannot be central. It must be off to one side of the center of the model.
quite a lot of weapon models bug with widescreen or such because they come closer than the 4-unit near-clip plane in areas which would not normally be visible, hence why high fov generally disables the viewmodel entirely.
You can make a model which is a viewmodel in one frame, and a world model in another, yes. But don't expect it to make sense to use the same frames in both situations.
You do still need to precache it. _________________ What's a signature? |
|
Back to top |
|
 |
Sajt
Joined: 16 Oct 2004 Posts: 1026
|
Posted: Wed Jun 09, 2010 1:03 am Post subject: |
|
|
Spike wrote: | it'll be placed at the player's origin, basically. |
Well, more specifically, the player's view origin (origin + view_ofs).
Spike wrote: | it'll move forwards and back a bit as you look up and down. |
Only if viewsize is not full (120) or really small, I think (that is, if the sbar "pushes it up"...) _________________ F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2004 phpBB Group
|