GithubHelp home page GithubHelp logo

Comments (11)

myzarfin avatar myzarfin commented on August 27, 2024 2

Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.
EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.

if i romove * then
image

end i try gethitboxposition(8) same result
thanks for your answer

Not sure why it does that. I assume you can just remove the std::optional and replace it with Vector and change the corresponding entity.cpp function to match basic returns for Vector. That must have been added in a recent update; I'm being by quite a bit, just before the netvar change and I added just that over anything else. You may have to wait for qo0 to reply because I'm not familiar with std::optional.

from qo0-csgo.

myzarfin avatar myzarfin commented on August 27, 2024 1

Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.

EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.

from qo0-csgo.

semidemi26 avatar semidemi26 commented on August 27, 2024 1

im working with an older version and its working perfectly, has the function changed?
Vector CBaseEntity::GetBonePosition(int iBone)
{
std::array<matrix3x4_t, MAXSTUDIOBONES> arrBonesToWorld;

if (this->SetupBones(arrBonesToWorld.data(), MAXSTUDIOBONES, BONE_USED_BY_ANYTHING, 0.f))
	return arrBonesToWorld.at(iBone).at(3);

return Vector{ };

}

also gethitboxposition is not objectively better

from qo0-csgo.

reaperpaster avatar reaperpaster commented on August 27, 2024 1

auto bonePos = entity->GetBonePosition(BONE_HEAD).value()
You need to use auto or Vector.
Btw in your screenshot you did .value() and it said Vector doesn't have value() but GetBonePosition is std::optional Vector not Vector so you probably messed up with the code.

from qo0-csgo.

Diwiasln avatar Diwiasln commented on August 27, 2024

Is there any particular reason you're using GetBonePosition over GetHitboxPosition? Hitboxes are objectively better than bones.

EDIT: As for the actual reason why it's not working, I just tested it with my edit and it looks like you're unnecessarily doing *entity->GetBonePosition(8). Remove the * and it should work just fine.

if i romove * then
image

end i try gethitboxposition(8) same result
thanks for your answer

from qo0-csgo.

Diwiasln avatar Diwiasln commented on August 27, 2024

i changed std::optional vector to vector

but i have a lot of error more :D

image
image

from qo0-csgo.

Diwiasln avatar Diwiasln commented on August 27, 2024

oh okay i fixed error (just deleted :p)

and got some result :(

Screenshot_5
Screenshot_6

and i try again gethitboxposition and again some result :(

from qo0-csgo.

Diwiasln avatar Diwiasln commented on August 27, 2024

thanks for answer

i changed getboneposition code and got some result :'(
Screenshot_8

Screenshot_7

from qo0-csgo.

Diwiasln avatar Diwiasln commented on August 27, 2024

thanks for answer

i changed code like ur comment

image

image

but same result

from qo0-csgo.

rollraw avatar rollraw commented on August 27, 2024

about std::optional u can read here
so, u should check is it has value (with .has_value()) or just use .value() / .value_or(default value)
but u can notice problem isn't in getbonepos because ur calculations wrong and u should normalize calculated angle after subtract punch from it

pseudo:

QAngle angPunch = pLocal->GetPunch() * 2.0f // prefered weapon_recoil_scale instead hardcoded "2.0"
angPunch.Normalize();

QAngle angAim = M::CalcAngle(pLocal->GetEyePosition(), pEntity->GetBonePosition(BONE_HEAD).value()) - (pCmd->angViewPoint + angPunch)
angAim.Normalize()

from qo0-csgo.

rollraw avatar rollraw commented on August 27, 2024

op didnt answered for 2 days, should be fixed. closed

from qo0-csgo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.