Visibility Check Problem?

Posts 16 of 6 · Page 1 of 1
Visibility Check Problem?
I have a problem with raytrace visibility check. When players jump, it shows them as invisible. I am raytracing from the local player eye position to enemies head hitbox(not bone!). I had the same problem with bones, so it shouldn't matter.

Visibility check code:
Code:
bool IsEntityVisible(C_CSPlayer* Entity, SourceEngine::Vector EndPos)
{
	Ray_t ray;
	trace_t tr;

	ray.Init(G::pLocal->GetEyePos(), EndPos);

	CTraceFilter filter;
	filter.pSkip = G::pLocal;

	Interfaces::EngineTrace()->TraceRay(ray, 0x46004003, &filter, &tr);

	if (tr.m_pEnt == Entity)
		return true;

	return false;
}
Video showing the problem:


Also, why mins and maxs does not update properly? I am getting them with NetVars, not virtual functions, could that be the problem? You can see it by the ESP lagging behind the player when they are jumping.
What do you pass to endpos? Also the video is set to private...
Quote Originally Posted by Orinion77 View Post
What do you pass to endpos? Also the video is set to private...
I set it to unlisted. Should be able to view now. I am ray tracing to the targets hitbox or a bone, doesn't matter, I tried both, result is the same. In the video, it's set to the head hitbox.
Is this problem occurring if you are not jumping but the enemy is?
Quote Originally Posted by hf.ub3r View Post
Is this problem occurring if you are not jumping but the enemy is?
Yes, same problem.
I've reasons to believe this has been solved.

/Closed.
Posts 16 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Need help?