Jump to content
Korean Random

How to get the chariot LWH


ahwa

Recommended Posts

How to get the chariot LWH

 

Length  = Target.typeDescriptor.chassis['hullPosition'].x

High = Target.typeDescriptor.chassis['hullPosition'].y + Target.hull['turretPositions'][0].y

Width = Target.typeDescriptor.chassis['hullPosition'].z

 

How will be the middle And not Length Width Height

Link to comment
Short link
Share on other sites


def add_observed_piont(vehicle_id):
try:
self = BigWorld.player().arena.vehicles[vehicle_id]['vehicleType']
if not hasattr(self, 'visibilityCheckPoints') or hasattr(self, 'observerPosOnChassis'):
hullPos = self.chassis['hullPosition']
hullBboxMin, hullBboxMax, _ = self.hull['hitTester'].bbox
turretPosOnHull = self.hull['turretPositions'][0]
turretLocalTopY = max(hullBboxMax.y, turretPosOnHull.y + self.turret['hitTester'].bbox[1].y)
gunPosOnHull = turretPosOnHull + self.turret['gunPosition']
hullLocalCenterY = (hullBboxMin.y + hullBboxMax.y) / 2.0
hullLocalPt1 = Vector3(0.0, hullLocalCenterY, hullBboxMax.z)
hullLocalPt2 = Vector3(0.0, hullLocalCenterY, hullBboxMin.z)
hullLocalCenterZ = (hullBboxMin.z + hullBboxMax.z) / 2.0
hullLocalPt3 = Vector3(hullBboxMax.x, gunPosOnHull.y, hullLocalCenterZ)
hullLocalPt4 = Vector3(hullBboxMin.x, gunPosOnHull.y, hullLocalCenterZ)
self.visibilityCheckPoints = (Vector3(0.0, hullPos.y + turretLocalTopY, 0.0),
hullPos + gunPosOnHull,
hullPos + hullLocalPt1,
hullPos + hullLocalPt2,
hullPos + hullLocalPt3,
hullPos + hullLocalPt4)
self.checkpointID = 0
self.observerPosOnChassis = Vector3(0, hullPos.y + turretLocalTopY, 0)
self.observerPosOnTurret = self.turret['gunPosition']
except:
pass
Link to comment
Short link
Share on other sites

THX
I have studied a look


I do not understand

In advice

def add_observed_piont(vehicle_id):
    try:
        self = BigWorld.player().arena.vehicles[vehicle_id]['vehicleType']
        if not hasattr(self, 'visibilityCheckPoints') or hasattr(self, 'observerPosOnChassis'):
            hullPos = self.chassis['hullPosition']
            hullBboxMin, hullBboxMax, _ = self.hull['hitTester'].bbox
            turretPosOnHull = self.hull['turretPositions'][0]
            turretLocalTopY = max(hullBboxMax.y, turretPosOnHull.y + self.turret['hitTester'].bbox[1].y)
            gunPosOnHull = turretPosOnHull + self.turret['gunPosition']
            hullLocalCenterY = (hullBboxMin.y + hullBboxMax.y) / 2.0
            hullLocalPt1 = Vector3(0.0, hullLocalCenterY, hullBboxMax.z)
            hullLocalPt2 = Vector3(0.0, hullLocalCenterY, hullBboxMin.z)
            hullLocalCenterZ = (hullBboxMin.z + hullBboxMax.z) / 2.0
            hullLocalPt3 = Vector3(hullBboxMax.x, gunPosOnHull.y, hullLocalCenterZ)
            hullLocalPt4 = Vector3(hullBboxMin.x, gunPosOnHull.y, hullLocalCenterZ)
            self.visibilityCheckPoints = (Vector3(0.0, hullPos.y + turretLocalTopY, 0.0), hullPos + gunPosOnHull, hullPos + 

hullLocalPt1, hullPos + hullLocalPt2, hullPos + hullLocalPt3, hullPos + hullLocalPt4)
            self.checkpointID = 0
            self.observerPosOnChassis = Vector3(0, hullPos.y + turretLocalTopY, 0)
            self.observerPosOnTurret = self.turret['gunPosition']
    except:
        pass

LengthPosition HighPosition WidthPosition

 

To send a message in return self.observerPosOnChassis ????

Link to comment
Short link
Share on other sites



def add_observed_piont(vehicle_id):
    try:
        self = BigWorld.player().arena.vehicles[vehicle_id]['vehicleType']
        if not hasattr(self, 'visibilityCheckPoints') or hasattr(self, 'observerPosOnChassis'):
            hullPos = self.chassis['hullPosition']
            hullBboxMin, hullBboxMax, _ = self.hull['hitTester'].bbox
            turretPosOnHull = self.hull['turretPositions'][0]
            turretLocalTopY = max(hullBboxMax.y, turretPosOnHull.y + self.turret['hitTester'].bbox[1].y)
            gunPosOnHull = turretPosOnHull + self.turret['gunPosition']
            hullLocalCenterY = (hullBboxMin.y + hullBboxMax.y) / 2.0
            hullLocalPt1 = Vector3(0.0, hullLocalCenterY, hullBboxMax.z)
            hullLocalPt2 = Vector3(0.0, hullLocalCenterY, hullBboxMin.z)
            hullLocalCenterZ = (hullBboxMin.z + hullBboxMax.z) / 2.0
            hullLocalPt3 = Vector3(hullBboxMax.x, gunPosOnHull.y, hullLocalCenterZ)
            hullLocalPt4 = Vector3(hullBboxMin.x, gunPosOnHull.y, hullLocalCenterZ)
            self.visibilityCheckPoints = (Vector3(0.0, hullPos.y + turretLocalTopY, 0.0),
             hullPos + gunPosOnHull,
             hullPos + hullLocalPt1,
             hullPos + hullLocalPt2,
             hullPos + hullLocalPt3,
             hullPos + hullLocalPt4)
            self.checkpointID = 0
            self.observerPosOnChassis = Vector3(0, hullPos.y + turretLocalTopY, 0)
            self.observerPosOnTurret = self.turret['gunPosition']
    except:
        pass

just one note:

at beginning of the battle, you will have no bbox available, so need to call loadBspModel() at 'hitTester' objects

Link to comment
Short link
Share on other sites

just one note:

at beginning of the battle, you will have no bbox available, so need to call loadBspModel() at 'hitTester' objects

I still do not understand, give a simple example, can you?

THX

Link to comment
Short link
Share on other sites

AimPos.y += AimVehicle.typeDescriptor.chassis['hullPosition'].y * 0.47 + autoAimVehicle.typeDescriptor.hull['turretPositions'][0].y * 0.47

 

 

:gg:  :glare:

This is the height location

Rather than the pixel length and width and height

 

Show screen test

g_windowsManager.battleWindow.call('battle.PlayerMessagesPanel.ShowMessage', ['0', str(AimVehicle.typeDescriptor.chassis['hullPosition'].y), 'red'])

Showing 0.0

Obviously he is to take the middle position of the target height

However, I would like to come up with pixel length and width and height

 

Link to comment
Short link
Share on other sites

AimPos = Math.Vector3(autoAimVehicle.position)

AimPos.y += AimVehicle.typeDescriptor.chassis['hullPosition'].y * 0.47 + autoAimVehicle.typeDescriptor.hull['turretPositions'][0].y * 0.47

I would like to know the enemy tanks pixels total width and total height and total length

Now, the code is just total height?

How to x and z total

Link to comment
Short link
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...