--
[ 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
>
>
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to