Trouble with view matrix?

Posts 13 of 3 · Page 1 of 1
Trouble with view matrix?
I am wondering if I have the right thing? A view matrix consists of 16 floats correct? I've found the pitch/yaw in a game (changing the value changes it ingame.) and when I move my camera around in memory view, only 11 floats change like so:


This is my first attempt of making a ESP/Aimbot, I've gotten everything I need except world to screen. Is this the view matrix? If not, how should I go about finding it? (as I've found it the way several tutorials on finding it have.)

Also, it might be worth noting that the player coordinates are the "20.65, 4.35, -53.40" I assume I don't need these for view matrix but correct me if I'm wrong?

Thanks in advance.
Sorry that i'm so late, but if u only need w2s you can do something like this.
It's for GTA, but you can adapt it propably to every other 3D Games
Code:
    	bool	get_entity_offset_from_coords(v3& out, Entity lEntity, v3 coords)
    	{
    		bool		ret;
    		CEntity*	pEntity;
    		v3			dir,
    					x,
    					y,
    					z;
     
    		ret			= false;
    		pEntity		= handle_to_ptr<CEntity>(lEntity);
     
    		if(pEntity == nullptr)
    			goto LABEL_RETURN;
     
    		dir		= coords - (v3) pEntity->_3dMatrix._3;
    		x		= v3(pEntity->_3dMatrix._0.x, pEntity->_3dMatrix._1.x, pEntity->_3dMatrix._2.x) * dir.x;
    		y		= v3(pEntity->_3dMatrix._0.y, pEntity->_3dMatrix._1.y, pEntity->_3dMatrix._2.y) * dir.y;
    		z		= v3(pEntity->_3dMatrix._0.z, pEntity->_3dMatrix._1.z, pEntity->_3dMatrix._2.z) * dir.z;
    		out		= x + y + z;
    		ret		= true;
     
    	LABEL_RETURN:
    		return ret;
    	}
If 20.65, 4.35, -53.40 is your worldpostion then this is probably the Inverse Viewmatrix(or camera matrix), invert it to get the viewmatrix.
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?