• Entity.GetBonePosition() returning incorrect values.
    0 replies, posted
Okay, I'm using this function to line up entities to certain bones on players, most of the time it works perfectly. However when firing a weapon (especially a fast one such as SMG) the entities start to lag behind the player they're following. I'm guessing this is somehow to do with the lag compensation that weapons use, but this function is being called on the client, so shouldn't it get the position of the model on the client, regardless of lag compensation? If anyone has any explanation of why this happens and how I may work around it, please let me know. --Edit Never mind, figured it out. As I always do as soon as I ask for help. ¬.¬ Changed [code]local pos, ang = GetBonePosition(boneindex)[/code] To [code]local matrix = self.owner:GetBoneMatrix(boneindex) local pos = matrix:GetTranslation() local ang = matrix:GetAngle()[/code] Now the bug is gone. O.o
Sorry, you need to Log In to post a reply to this thread.