Hi everyone,
over the last couple of days I've been trying to fix a problem I'm having.
Something I thought would be quite easy to fix but alas as everything in game
development turned out to be really complicated. :(
So here is what I'm trying to do and what the reason is for it not working. In
my Mod the mappers can define a custom player model. This model can basically be
anything. Like lets say a couch, a chair or whatever. Now this works fine but no
matter what model it gets positioned into the ground by half its height.
Now I did some research and I think this is because the collision boundary of
the player gets calculated using the $origin value defined in the QC file when
compiling the model. Now this is fine for player models where the origin is at
the bottom. But what I found out is that most other props have their $origin
centered in the middle of the model. Which explains the offset by 50% of the
height. Am I correct with this assumption?
What I tried to was change the predefined player hull values in HL2MPViewVectors
g_HL2MPViewVectors but this had an effect on viewports and player collisions but
none on the actual positioning of the model in the world.
I've also tried to modify the origin values using SetLocalOrigin. But again this
didn't seem to have any effect whatsoever.
Could anyone of you more experienced developers help me out here?
How can I set an offset to the model before its collisions boxes get compiled?
Is it even possible to change the $origin value before it gets accessed
everywhere else in the code?
Is that value even accessed or do I have to approach this some other way?
Thank you for any light on this and best regards,
Tobias
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders