Jump to content

Check distance from the ground texture.


Mykoplazma

Recommended Posts

D3D.TraceLine( x, y, z, rx1, ry1, rz1, Bit.Or( INTERSECT_TERRAIN ) or something like that possible? I need to know how exactly far I'm from the ground to make good gathering profile ( stable height = more speed )

Link to comment
Share on other sites

Hello, with code like 

        Memory.WowMemory.LockFrame();
        Vector3 found = Vector3.Zero;
        for (float i = 1; i < 150; i+= 0.5f)
        {
            var to = new  Vector3(ObjectManager.Me.Position.X, ObjectManager.Me.Position.Y, ObjectManager.Me.Position.Z - i);
            bool obstacleFound = wManager.Wow.Helpers.TraceLine.TraceLineGo(ObjectManager.Me.Position, to, CGWorldFrameHitFlags.HitTestGroundAndStructures);
            if (obstacleFound)
            {
                found = new Vector3(to);
                break;
            }
        }
        Memory.WowMemory.UnlockFrame();

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...