> > makes it look buggy and jittery as hell.
> >
> > My last idea was a IPhysicsMotionController, just like the one that the
> > gravity gun uses, as I found this line in player.h:
> >
> > PFLAG_VPHYSICS_MOTIONCONTROLLER =3D ( 1<<4 ), // player is physically
> > attached to a motion controller
> >
> > ...although I don't know how efficient would this be.
> >
> > Plus I'm sure that there must be a much cheaper, easier way around it.
> > So, any input on what would be the best approach to this problem is
> > appreciated, before I spend my whole afternoon messing with the motion
> > controller...
> >
> > Thanks in advance.
> >
> > --
> > Vincent "Tanoku" Mart=ED
> > --
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
>
>
--__--__--
Message: 2
Date: Mon, 13 Mar 2006 14:27:24 -0700
From: "Michael Kramer" <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [hlcoders] Re: Re: Glue that damn player to the seat!
Reply-To: [email protected]
--
[ Picked text/plain from multipart/alternative ]
I am going to attempt to code a motorcycle type vehicle, fi I get it working
then I will write a tut for the WIKI, but Im just planning it now.
On 3/13/06, Vicent Marti <[EMAIL PROTECTED]> wrote:
>
> Thanks for that code, I'm sure it will come in handy. Yesterday I
> fixed my problem by hacking the GetRenderAngles() and
> GetRenderOrigin() functions of the player class so they return the
> vehicle's angles and origins when inside a vehicle.
>
> Looks like a really cheap way to fix it (no physics involved,
> clientside), although I'm concerned about the effects when being shoot
> by other players, and with the position that will show on the other
> clients. I will have to run some tests, probably give your code a
> go...
>
> I'll make sure to write something in the Wiki as soon as I've got
> something that really works. I can't believe nobody hasn't written
> anything serious on vehicles yet.
>
> Thanks again, -Vicent.
>
> > [ Picked text/plain from multipart/alternative ]
> > I don't know if this will help, but for the StickyLauncher which I have
> > coded, the bombs stick to objects, and follow them, as you can throw the
> > object around and it follows it as it should. The code for that is as
> > follows:
> >
> > CBaseAnimating *pOtherAnim =3D dynamic_cast<CBaseAnimating *>(pOther);
> > //if ( pOtherAnim )
> > //{
> > matrix3x4_t bombWorldSpace;
> > MatrixCopy( EntityToWorldTransform(),
> bombWorldSpac=
> > e
> > );
> >
> > // get the bone info so we can follow the bone
> > FollowEntity( pOther );
> > SetOwnerEntity( pOther );
> > m_boneIndexAttached =3D
> pOtherAnim->GetHitboxBone(
> > tr.hitbox );
> > matrix3x4_t boneToWorld;
> > pOtherAnim->GetBoneTransform(
> m_boneIndexAttached,
> > boneToWorld );
> >
> > // transform my current position/orientation
> into
> > the hit bone's space
> > // UNDONE: Eventually we need to intersect with
> the
> > mesh here
> > // REVISIT: maybe do something like the decal
> code
> > to find a spot on
> > // the mesh.
> > matrix3x4_t worldToBone, localMatrix;
> > MatrixInvert( boneToWorld, worldToBone );
> > ConcatTransforms( worldToBone, bombWorldSpace,
> > localMatrix );
> > MatrixAngles( localMatrix,
> > m_boneAngles.GetForModify(), m_bonePosition.GetForModify() );
> > return;
> >
> >
> >
> > You can then, add a , SetParent( pOther );
> >
> > I don't know if this will help you, but it might.
> >
> > On 3/12/06, Vicent Marti <[EMAIL PROTECTED]> wrote:
> > >
> > > --
> > > [ Picked text/plain from multipart/alternative ]
> > > Over the last few days, I've been trying to get third person player
> model=
> > s
> > > to work when inside of vehicles.
> > > As you may know, original HL2 has no support for this whatsoever
> (there
> > > isn't even a third person player model for our dear Gordon Freeman),
> so
> > > there is a small bit of coding work to get all the animations working
> > > properly. Either way, that's working already: As you may have guessed
> by
> > > the
> > > title, my main concern is to make the animated model follow the
> vehicle.
> > >
> > > In the CBasePlayer::GetInVehicle(), the method which Valve uses is a
> > > simple
> > > SetParent() which doesn't work as it should. Yes, the player model
> moves
> > > and
> > > rotates together with the vehicle, but as soon as the car leaves flat
> > > ground
> > > (starts climbing a slope, jumps into the air, flips over or whatever),
> th=
> > e
> > > player model is stuck in its original position, just like if the car
> was
> > > still on flat ground.
> > >
> > > Obviously, I need a better way to "glue" the player to the vehicle to
> mak=
> > e
> > > it look at least a tad realistic. I have tried with EF_BONEMERGE,
> which
> > > seems to make no effect (=BF?) and with a fixed physics constraint,
> which
> > > makes it look buggy and jittery as hell.
> > >
> > > My last idea was a IPhysicsMotionController, just like the one that
> the
> > > gravity gun uses, as I found this line in player.h:
> > >
> > > PFLAG_VPHYSICS_MOTIONCONTROLLER =3D ( 1<<4 ), // player is
> physically
> > > attached to a motion controller
> > >
> > > ...although I don't know how efficient would this be.
> > >
> > > Plus I'm sure that there must be a much cheaper, easier way around it.
> > > So, any input on what would be the best approach to this problem is
> > > appreciated, before I spend my whole afternoon messing with the motion
> > > controller...
> > >
> > > Thanks in advance.
> > >
> > > --
> > > Vincent "Tanoku" Mart=ED
> > > --
> > >
> > > _______________________________________________
> > > To unsubscribe, edit your list preferences, or view the list archives,
> > > please visit:
> > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > >
> > >
> >
> >
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--
--__--__--
Message: 3
Date: Mon, 13 Mar 2006 17:45:10 -0500
From: Skillet <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [hlcoders] Re: Re: Glue that damn player to the seat!
Reply-To: [email protected]
--
[ Picked text/plain from multipart/alternative ]
An article on adding third person player models to vehicles would certainly
help out a lot of mod teams, as that's one of the biggest problems that
needs to be addressed before vehicles are feasible in gameplay.
Good idea.
:)
On 3/13/06, Michael Kramer <[EMAIL PROTECTED]> wrote:
>
> --
> [ Picked text/plain from multipart/alternative ]
> I am going to attempt to code a motorcycle type vehicle, fi I get it
> working
> then I will write a tut for the WIKI, but Im just planning it now.
>
> On 3/13/06, Vicent Marti <[EMAIL PROTECTED]> wrote:
> >
> > Thanks for that code, I'm sure it will come in handy. Yesterday I
> > fixed my problem by hacking the GetRenderAngles() and
> > GetRenderOrigin() functions of the player class so they return the
> > vehicle's angles and origins when inside a vehicle.
> >
> > Looks like a really cheap way to fix it (no physics involved,
> > clientside), although I'm concerned about the effects when being shoot
> > by other players, and with the position that will show on the other
> > clients. I will have to run some tests, probably give your code a
> > go...
> >
> > I'll make sure to write something in the Wiki as soon as I've got
> > something that really works. I can't believe nobody hasn't written
> > anything serious on vehicles yet.
> >
> > Thanks again, -Vicent.
> >
> > > [ Picked text/plain from multipart/alternative ]
> > > I don't know if this will help, but for the StickyLauncher which I
> have
> > > coded, the bombs stick to objects, and follow them, as you can throw
> the
> > > object around and it follows it as it should. The code for that is as
> > > follows:
> > >
> > > CBaseAnimating *pOtherAnim =3D dynamic_cast<CBaseAnimating *>(pOther);
> > > //if ( pOtherAnim )
> > > //{
> > > matrix3x4_t bombWorldSpace;
> > > MatrixCopy( EntityToWorldTransform(),
> > bombWorldSpac=
> > > e
> > > );
> > >
> > > // get the bone info so we can follow the bone
> > > FollowEntity( pOther );
> > > SetOwnerEntity( pOther );
> > > m_boneIndexAttached =3D
> > pOtherAnim->GetHitboxBone(
> > > tr.hitbox );
> > > matrix3x4_t boneToWorld;
> > > pOtherAnim->GetBoneTransform(
> > m_boneIndexAttached,
> > > boneToWorld );
> > >
> > > // transform my current position/orientation
> > into
> > > the hit bone's space
> > > // UNDONE: Eventually we need to intersect
> with
> > the
> > > mesh here
> > > // REVISIT: maybe do something like the decal
> > code
> > > to find a spot on
> > > // the mesh.
> > > matrix3x4_t worldToBone, localMatrix;
> > > MatrixInvert( boneToWorld, worldToBone );
> > > ConcatTransforms( worldToBone, bombWorldSpace,
> > > localMatrix );
> > > MatrixAngles( localMatrix,
> > > m_boneAngles.GetForModify(), m_bonePosition.GetForModify() );
> > > return;
> > >
> > >
> > >
> > > You can then, add a , SetParent( pOther );
> > >
> > > I don't know if this will help you, but it might.
> > >
> > > On 3/12/06, Vicent Marti <[EMAIL PROTECTED]> wrote:
> > > >
> > > > --
> > > > [ Picked text/plain from multipart/alternative ]
> > > > Over the last few days, I've been trying to get third person player
> > model=
> > > s
> > > > to work when inside of vehicles.
> > > > As you may know, original HL2 has no support for this whatsoever
> > (there
> > > > isn't even a third person player model for our dear Gordon Freeman),
> > so
> > > > there is a small bit of coding work to get all the animations
> working
> > > > properly. Either way, that's working already: As you may have
> guessed
> > by
> > > > the
> > > > title, my main concern is to make the animated model follow the
> > vehicle.
> > > >
> > > > In the CBasePlayer::GetInVehicle(), the method which Valve uses is a
> > > > simple
> > > > SetParent() which doesn't work as it should. Yes, the player model
> > moves
> > > > and
> > > > rotates together with the vehicle, but as soon as the car leaves
> flat
> > > > ground
> > > > (starts climbing a slope, jumps into the air, flips over or
> whatever),
> > th=
> > > e
> > > > player model is stuck in its original position, just like if the car
> > was
> > > > still on flat ground.
> > > >
> > > > Obviously, I need a better way to "glue" the player to the vehicle
> to
> > mak=
> > > e
> > > > it look at least a tad realistic. I have tried with EF_BONEMERGE,
> > which
> > > > seems to make no effect (=BF?) and with a fixed physics constraint,
> > which
> > > > makes it look buggy and jittery as hell.
> > > >
> > > > My last idea was a IPhysicsMotionController, just like the one that
> > the
> > > > gravity gun uses, as I found this line in player.h:
> > > >
> > > > PFLAG_VPHYSICS_MOTIONCONTROLLER =3D ( 1<<4 ), // player is
> > physically
> > > > attached to a motion controller
> > > >
> > > > ...although I don't know how efficient would this be.
> > > >
> > > > Plus I'm sure that there must be a much cheaper, easier way around
> it.
> > > > So, any input on what would be the best approach to this problem is
> > > > appreciated, before I spend my whole afternoon messing with the
> motion
> > > > controller...
> > > >
> > > > Thanks in advance.
> > > >
> > > > --
> > > > Vincent "Tanoku" Mart=ED
> > > > --
> > > >
> > > > _______________________________________________
> > > > To unsubscribe, edit your list preferences, or view the list
> archives,
> > > > please visit:
> > > > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> > > >
> > > >
> > >
> > >
> >
> > _______________________________________________
> > To unsubscribe, edit your list preferences, or view the list archives,
> > please visit:
> > http://list.valvesoftware.com/mailman/listinfo/hlcoders
> >
> >
> --
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list archives,
> please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--
--__--__--
Message: 4
Date: Mon, 13 Mar 2006 18:14:43 -0500
From: Jorge Rodriguez <[EMAIL PROTECTED]>
To: [email protected]
Subject: [hlcoders] IMesh::Draw() ignoring colors
Reply-To: [email protected]
I am drawing a kRenderTransAdd sprite, but the IMesh drawing function
seems to be ignoring the values that I pass into
meshBuilder.Color4ubv(). For example,
unsigned char color[4];
color[0] = 255;
color[1] = 0;
color[2] = 0;
color[3] = 255;
meshBuilder.Color4ubv (color);
[etc drawing code]
See the code in beamdraw.cpp:DrawSpriteModel_Helper() for an example.
This should show the sprite as bright red, but it shows it as its normal
color. What gives? If this is not the correct way to set the color/alpha
of an additive sprite, what is? I haven't tested it with other types of
transparency, so I suspect this might be a kRenderTransAdd thing.
--
Jorge "Vino" Rodriguez
--__--__--
Message: 5
Subject: RE: [hlcoders] IMesh::Draw() ignoring colors
Date: Mon, 13 Mar 2006 15:19:32 -0800
From: "Jay Stelly" <[EMAIL PROTECTED]>
To: <[email protected]>
Reply-To: [email protected]
I'd have to look at the code to be sure, but I'm guessing that the
shader you're using uses the constant color not per-vertex color.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Jorge Rodriguez
> Sent: Monday, March 13, 2006 3:15 PM
> To: [email protected]
> Subject: [hlcoders] IMesh::Draw() ignoring colors
>
> I am drawing a kRenderTransAdd sprite, but the IMesh drawing
> function seems to be ignoring the values that I pass into
> meshBuilder.Color4ubv(). For example,
>
> unsigned char color[4];
> color[0] = 255;
> color[1] = 0;
> color[2] = 0;
> color[3] = 255;
>
> meshBuilder.Color4ubv (color);
>
> [etc drawing code]
>
> See the code in beamdraw.cpp:DrawSpriteModel_Helper() for an example.
> This should show the sprite as bright red, but it shows it as
> its normal color. What gives? If this is not the correct way
> to set the color/alpha of an additive sprite, what is? I
> haven't tested it with other types of transparency, so I
> suspect this might be a kRenderTransAdd thing.
>
> --
> Jorge "Vino" Rodriguez
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--__--__--
Message: 6
Date: Mon, 13 Mar 2006 18:31:06 -0500
From: Jorge Rodriguez <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [hlcoders] IMesh::Draw() ignoring colors
Reply-To: [email protected]
Jay Stelly wrote:
>I'd have to look at the code to be sure, but I'm guessing that the
>shader you're using uses the constant color not per-vertex color.
>
>
LightMappedGeneric?
If it is using a constant color as you say, how would I go about
changing that? What I'm after is transparency, I'm trying to get the
sprite to fade in.
--
Jorge "Vino" Rodriguez
--__--__--
Message: 7
Subject: RE: [hlcoders] IMesh::Draw() ignoring colors
Date: Mon, 13 Mar 2006 17:09:45 -0800
From: "Jay Stelly" <[EMAIL PROTECTED]>
To: <[email protected]>
Reply-To: [email protected]
pMaterial->ColorModulate( r, g, b );
pMaterial->AlphaModulate( a );
where r,g,b,a are 0.0f - 1.0f, and pMaterial is the material you are
binding to draw the sprite.
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Jorge Rodriguez
> Sent: Monday, March 13, 2006 3:31 PM
> To: [email protected]
> Subject: Re: [hlcoders] IMesh::Draw() ignoring colors
>
> Jay Stelly wrote:
>
> >I'd have to look at the code to be sure, but I'm guessing that the
> >shader you're using uses the constant color not per-vertex color.
> >
> >
> LightMappedGeneric?
>
> If it is using a constant color as you say, how would I go
> about changing that? What I'm after is transparency, I'm
> trying to get the sprite to fade in.
>
> --
> Jorge "Vino" Rodriguez
>
>
> _______________________________________________
> To unsubscribe, edit your list preferences, or view the list
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
--__--__--
Message: 8
Date: Mon, 13 Mar 2006 20:51:21 -0700
From: "Michael Kramer" <[EMAIL PROTECTED]>
To: [email protected]
Subject: [hlcoders] Problems..
Reply-To: [email protected]
--
[ Picked text/plain from multipart/alternative ]
I don't know what happened, whether it was the last steam update or what.
But since then. The AI That I coded in, for MP (followed the tutorial on the
WIKI) no Longer Works.
One of the weapons which I had, which was working perfectly (well near
perfect) now errors when you switch to it.
Once when I was switching to the normal SMG (though with a custom model) it
errored and kicked me out. Though the next time I did it, it i did not
error.
Any ideas?
Thankx
-Kramer
--
--__--__--
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please