The fundemental problem in this puzzle is getting the position of a
server side entity (the projectile) to match up with the predicted
position of the players view model on the client. There's no easy way
to do it, because even if it was a listen server, the view model and
the world model attachment points will seldom line up.

There is, however, something experimental that valve have in the base
entity code but didn't use in hl2/cs/etc afaik, it's the
CreatePredictedEntityByName() function. It creates the entity on the
client and uses a CPredictableId to match it up with the server side
entity and mabey even interpolates the projectiles position between
server and client.

On 6/21/05, Ian Warwick <[EMAIL PROTECTED]> wrote:
> This is a multi-part message in MIME format.
> --
> [ Picked text/plain from multipart/alternative ]
> I have a weapon that fires a projectile, much like the rpg or the
> crossbow.
>
> I want the projectile to appear as if its firing from an attachment
> point on the viewmodel and also if its 3rd person from an attachment
> point on the world model, or.. if its another player, firing from an
> attachment point on their world model.
>
> Well all this poses a problem for me, as it seems niether the rpg or the
> crossbow fire from attachment points so its difficult to find some
> example code.
>
> Somehow I doubt its entirely possible to make it seem like its firing
> from a certain point in the above 3 situations, if the projectile is
> created on the server.
>
> Simply looking up the attachment in the weapon code with GetAttachment()
> won't really work here.
>
> If any 3d gurus could give me some help here explaining what I may need
> to do, it would be much appreciated, maybe its a matter of creating the
> rocket on the client and then formatting the attachment for the
> viewmodel, like the physcannon handles the gauss beam.
>
> regards
>
> Ian
>
> ====================================================================
> This email and any files transmitted with it are confidential and intended 
> solely for the use of the individual or entity to whom they are addressed. If 
> you have received this email in error you are on notice of its status. Please 
> notify us immediately by return email if you are not the intended recipient 
> and delete this message. Please note that any views or opinions presented in 
> this email are solely those of the author and do not necessarily represent 
> those of FusionPeople Ltd.
>
> FusionPeople Ltd may monitor outgoing and incoming emails and other 
> telecommunications on its email and telecommunication systems.
>
> =======================================================================
> This message has been checked for all known viruses by MessageLabs, The 
> service does not scan any password protected or encrypted attachments.  
> FusionPeople Ltd accepts no liability for any damage caused by any virus 
> transmitted by this email.
> --
>
> _______________________________________________
> 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