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

Joined: 12 Oct 2008 Posts: 15
|
Posted: Sun Oct 12, 2008 10:30 pm Post subject: Model position in relation to player |
|
|
I'm having a slight problem. For my mod I'm wanting to have a model which stays in front of the player in the same position on screen at all times (similar to a weapon model). The code works right for the most part, but when I go to look up the model will move behind the player and when I look down it moves away.
This is my code:
Code: | local entity onscreen1
onscreen1 = find (world, classname, "h1");
setorigin (onscreen1, self.origin+v_forward*20-v_right*18.5+v_up*30);
onscreen1.angles=self.angles;
onscreen1.angles_x=self.v_angle_x-self.v_angle_x*2;
setmodel (onscreen1, "progs/test.mdl"); |
It also likes to bob the opposite direction the camera does. Any solutions? |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
|
Back to top |
|
 |
vicious1988

Joined: 12 Oct 2008 Posts: 15
|
Posted: Mon Oct 13, 2008 12:16 am Post subject: |
|
|
Thanks for the help, I figured it out from your thread. I forgot to add the view offset. I knew it would be something painfully obvious. Just not that painful.
Works great:
    |
|
Back to top |
|
 |
MeTcHsteekle
Joined: 15 May 2008 Posts: 397 Location: its a secret
|
Posted: Mon Oct 13, 2008 12:28 am Post subject: |
|
|
a health bar?
a Zelda mod ?
/ HA HA i kicked your ass Firefox look at me post at i3d with you bwahahahahaha _________________ bah |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Mon Oct 13, 2008 12:53 am Post subject: |
|
|
is that a zelda mod? i might be tempted to help you with that... i usually stray away from fan based games like that... (halo portable is my first) but just for experience sake it might be fun. _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
vicious1988

Joined: 12 Oct 2008 Posts: 15
|
Posted: Mon Oct 13, 2008 1:06 am Post subject: |
|
|
I love how you can put 10 red dots in the top left corner of the screen, add a sword, and everyone instantly says "That's Zelda!"
Help's always welcome. I've already added in the sword, hookshot, bombs (need to fix the timing), heart system, and an early C-slot system w/ equip menu. It still has all the original Quake weapons too.
Only reason I'm using vanilla Quake is so it will work with Eluan's Wii port. I'm planning on probably switching from models to sprites for the display since its a little more cost effective and takes less time to modify. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Mon Oct 13, 2008 1:28 am Post subject: |
|
|
is it an rpg mod? ill definantly help with that! _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
MeTcHsteekle
Joined: 15 May 2008 Posts: 397 Location: its a secret
|
Posted: Mon Oct 13, 2008 2:08 am Post subject: |
|
|
heh add gyro, a wand thing, a big map with a lot of water and BOOM "the wind waker"
oh i forgot, a red boat that talks _________________ bah |
|
Back to top |
|
 |
vicious1988

Joined: 12 Oct 2008 Posts: 15
|
Posted: Mon Oct 13, 2008 3:27 am Post subject: |
|
|
Right now I'm just getting the basic systems in and operating, although Gyro does sound appealing. I'm aiming to make this very similar to the actual Zelda games, but there's that Quake element I'm oh so tempted to keep, I've already decided to keep it first person since I really don't want to make major modifications to the player model.
Wednesday I'll probably convert the heart system to sprites and work on changing the equip menu to graphical instead of centerprint. Feel free to post any ideas you have, be it weapons, items, plot, etc. |
|
Back to top |
|
 |
Spike
Joined: 05 Nov 2004 Posts: 944 Location: UK
|
Posted: Mon Oct 13, 2008 9:09 am Post subject: |
|
|
Its an old unfixable legacy bug in quake's sw renderer.
Alias models (that is, blah.mdl files) are drawn with their pitch inverted.
Of course, because mods use it, GL mimics it and noone can break it now.
v_angles is the 'proper' way around, but angles is upside down.
Just invert angles_x. Subtract it from 0, or multiply with -1, or something.
This also applies to the makevectors builtin. angles needs to be flipped.
Yeah, you already do that.
Mneh. _________________ What's a signature? |
|
Back to top |
|
 |
vicious1988

Joined: 12 Oct 2008 Posts: 15
|
Posted: Mon Oct 13, 2008 11:20 pm Post subject: |
|
|
Well, I experimented earlier with switching to sprites. No success. Always too pixelated. Guess I'm stuck with models for the time being.
Anyways, I switched the item equip menu from centerprint to models.

Needs some texture tweaking and it will look pretty good.
By the way, is there any way to make a model have fullbright? That would make the ghetto model hud look better...hopefully. |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Tue Oct 14, 2008 12:54 am Post subject: |
|
|
couldnt you just make a large sprite and resize it with in the engine?
also for full bright models couldnt you just apply full bright textures? use full bright colors from the pallet.) _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
vicious1988

Joined: 12 Oct 2008 Posts: 15
|
Posted: Tue Oct 14, 2008 1:21 am Post subject: |
|
|
I was looking for a function to resize sprites and/or models. Only thing I noticed was setsize which is for bounding boxes.
As for changing texture colors, the models would still be affected by lights, wouldn't they? |
|
Back to top |
|
 |
ceriux

Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA
|
Posted: Tue Oct 14, 2008 1:41 am Post subject: |
|
|
err, i think they would cast a shadow... but what iv seen at least is if it uses a full bright color from the pallet then that color is always full bright dark or day .
actually i know it will work
wazat's conquest mod has a model with full bright colors and it looks awsome the tips of some spikes look like they have lava oozing over them and the colors that arnt full bright look black in the shadows u can barely see the weapon but the spikes glow almost. awsome effect :d _________________ QuakeDB - Quake ModDB Group |
|
Back to top |
|
 |
MeTcHsteekle
Joined: 15 May 2008 Posts: 397 Location: its a secret
|
Posted: Tue Oct 14, 2008 1:52 am Post subject: |
|
|
.. but i think not all engines can see full brights, like the original glquake, and im pretty sure that glpro does not see them either,
but winquake, dosquake, glqrack, and darkplaces can have full brights, at least those are the ones i know have them  _________________ bah |
|
Back to top |
|
 |
|