How to see enemy view angles?

Posts 1–7 of 7 · Page 1 of 1
How to see enemy view angles?
Possible? i drew these up in photoshop to better explain what i'm talking about.

This:


or this:


Obviously you would just draw a line from point a to point b. But what are starting and ending points? Thanks guy's.

Should note i have already written several esp's in directx so i have the prerequisites. Just not sure how to actually do this one.
traceray starting point entity headpos or whatever you want then endpos is when it hits a wall etc.
Quote Originally Posted by Draig9 View Post
traceray starting point entity headpos or whatever you want then endpos is when it hits a wall etc.
Sorry man, i'm unfamiliar with tracerays. Any more info you could help me with?
Quote Originally Posted by HexMurder View Post


Sorry man, i'm unfamiliar with tracerays. Any more info you could help me with?
You internal or external? If your internal Just go look at some of the decently made sources like markHc's base since it includes traceray's if your external then It's going to be a bit harder either by doing bsp parsing or you just chuck a limit on the length of the line. But you could possibly in theory I guess read an entity's position then work out their headpos/eyepos and work out it's orientation I guess but never tried it and no idea if it would work but really the easiest way is tracerays.
Quote Originally Posted by Draig9 View Post
You internal or external? If your internal Just go look at some of the decently made sources like markHc's base since it includes traceray's if your external then It's going to be a bit harder either by doing bsp parsing or you just chuck a limit on the length of the line. But you could possibly in theory I guess read an entity's position then work out their headpos/eyepos and work out it's orientation I guess but never tried it and no idea if it would work but really the easiest way is tracerays.
I'm external. What is bsp parsing? thanks
Internal ready for C+P, you could do this even external.

Code:
void BulletTrace(CBaseEntity* pEntity)
{
	Vector src3D, dst3D, forward, src, dst;
	trace_t tr;
	Ray_t ray;
	CTraceFilter filter;

	Math::AngleVectors(pEntity->GetEyeAngles(), &forward);
	filter.pSkip = pEntity;
	src3D = pEntity->GetBonePosition(6) - Vector(0, 0, 0);
	dst3D = src3D + (forward * 100);

	ray.Init(src3D, dst3D);

	I::EngineTrace->TraceRay(ray, MASK_SHOT, &filter, &tr);

	if (!Draw::WorldToScreen(src3D, src) || !Draw::WorldToScreen(tr.endpos, dst))
		return;

	Draw::DrawLine(src.x, src.y, dst.x, dst.y, Color(255, 0, 0, 255));
	Draw::DrawRect(dst.x - 3, dst.y - 3, 6, 6, Color(255, 0, 0, 255));
}
Been over a week since last update/bump after answers, assuming solved.

/Closed.
Posts 1–7 of 7 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us