Sorry for the late answer. I haven't been online lately.

Indeed, it looks like attaching the player model to an attachment on
the vehicle should work, but I can't test it right now.

On the other hand, from what I can see in this Doxygen repository of
the SDK source, there's nothing wrong with the SetParent() function on
CBaseEntity...

If there is indeed a bug in the function that needs to be fixed, would
you mind being a tad more specific on what is it?

Thanks in advance.

> I did this just yesterday, as it happens. You just gotta set the
> m_iParentAttachment when you SetParent() to make it align to that
> attachment point. I made a small hack function in cbaseentity so i
> could change this, as the SetParent( ent, attachindex) dosen't seem
> function correctly
>
> On 3/13/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 simp=
> le
> > 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 gro=
> und
> > (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, pl=
> ease 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