Is it possible to get the bone matrix of a player? #290
Unanswered
willjsaint
asked this question in
Questions
Replies: 1 comment 3 replies
-
You can get the position of the player's eyes by doing: s.on("weapon_fire", e => {
const player = demoFile.entities.getByUserId(e.userid)!;
const footPosition = player.position;
const eyePosition = {
...footPosition,
z:
footPosition.z +
player.getProp("DT_LocalPlayerExclusive", "m_vecViewOffset[2]")
};
console.log(`${player.name} shot from`, eyePosition);
}); This offset should always be correct (e.g. it will smoothly change if the player is ducking). Let me know how you get on. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to find the position of the head bone of players, googling comes up with "m_dwBoneMatrix" but I wasn't able to find anything of that in the API. Is there any way of getting that info?
Beta Was this translation helpful? Give feedback.
All reactions