Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RPF Explorer] Bound composite children embedded in YDRs do not get the correct PolyFlags when exported #218

Open
Tim-R opened this issue Sep 18, 2023 · 0 comments

Comments

@Tim-R
Copy link

Tim-R commented Sep 18, 2023

Codewalker version: 30_dev45

When exporting a YDR with embedded bound composite children (Bound Box in this case) that have Poly Flags (FLAG_TOO_STEEP_FOR_PLAYER [8192] in this case), the resultant PolyFlags in the .ydr.xml (`Drawable->Bounds->Children[0]->PolyFlags) is not correct.

Below is the ODR .bounds showing the PolyFlags including FLAG_TOO_STEEP_FOR_PLAYER, the YDR in question, and the bound item from the .ydr.xml. In game, FLAG_TOO_STEEP_FOR_PLAYER is applied and works as expected.

Version 43 31
{
	Type BoundComposite
	Radius 1.62892000
	AABBMax 1.21070900 1.08924400 0.05090470
	AABBMin -1.21070900 -1.08924400 -0.01598390
	Centroid 0.00000000 0.00000000 0.01746040
	CG 0.00000000 0.00000000 0.01746040
	Children 1
	{
		phBound
		{
			Type BoundBox
			Radius 0.74353700
			AABBMax 0.50000000 0.50000000 0.22988590
			AABBMin -0.50000000 -0.50000000 -0.22988590
			Centroid 0.00000000 0.00000000 0.00000000
			CG 0.00000000 0.00000000 0.00000000
			Margin 0.04000000
			Material
			{
				MaterialIndex 125
				ProcId 0
				RoomId 0
				PedDensity 0
				PolyFlags FLAG_TOO_STEEP_FOR_PLAYER
				MaterialColorIndex 0
			}
		}
	}
	ChildTransforms 1
	{
		Matrix 0
		{
			2.28651300 -0.13342220 0.00000000
			0.13490410 2.31190900 0.00000000
			0.00000000 0.00000000 0.14548230
			0.00000000 0.00000000 0.01746040
		}
	}
	ChildFlags 1
	{
		Item
		{
			Flags1 MAP_WEAPON MAP_DYNAMIC MAP_ANIMAL MAP_COVER MAP_VEHICLE
			Flags2 UNKNOWN MAP_WEAPON MAP_DYNAMIC MAP_ANIMAL MAP_COVER MAP_VEHICLE VEHICLE_NOT_BVH VEHICLE_BVH VEHICLE_BOX PED RAGDOLL ANIMAL ANIMAL_RAGDOLL OBJECT OBJECT_ENV_CLOTH PLANT PROJECTILE EXPLOSION PICKUP FOLIAGE FORKLIFT_FORKS TEST_WEAPON TEST_CAMERA TEST_AI TEST_SCRIPT TEST_VEHICLE_WHEEL GLASS MAP_RIVER SMOKE UNSMASHED MAP_STAIRS MAP_DEEP_SURFACE
		}
	}
}

<Item type="Box">
  <BoxMin x="-1.1452012" y="-1.157921" z="-0.03344433" />
  <BoxMax x="1.1452012" y="1.157921" z="0.03344433" />
  <BoxCenter x="0.0" y="0.0" z="0.0" />
  <SphereCenter x="0.0" y="0.0" z="0.0" />
  <SphereRadius value="1.6289215" />
  <Margin value="0.091616094" />
  <Volume value="0.4597718" />
  <Inertia x="0.10094918" y="0.10094918" z="0.16666667" />
  <MaterialIndex value="125" />
  <MaterialColourIndex value="0" />
  <ProceduralID value="0" />
  <RoomID value="0" />
  <PedDensity value="0" />
  <UnkFlags value="0" />
  <PolyFlags value="32" />
  <UnkType value="1" />
  <CompositeTransform>
    0.9983019828796387 -0.058252740651369095 0.0 0.0
    0.058252736926078796 0.9983019232749939 0.0 0.0
    0.0 0.0 1.0 0.0
    0.0 0.0 0.017460400238633156 1.0
  </CompositeTransform>
  <CompositeFlags1>MAP_WEAPON, MAP_DYNAMIC, MAP_ANIMAL, MAP_COVER, MAP_VEHICLE</CompositeFlags1>
  <CompositeFlags2>UNKNOWN, MAP_WEAPON, MAP_DYNAMIC, MAP_ANIMAL, MAP_COVER, MAP_VEHICLE, VEHICLE_NOT_BVH, VEHICLE_BVH, PED, RAGDOLL, ANIMAL, ANIMAL_RAGDOLL, OBJECT, OBJECT_ENV_CLOTH, PLANT, PROJECTILE, EXPLOSION, PICKUP, FOLIAGE, FORKLIFT_FORKS, TEST_WEAPON, TEST_CAMERA, TEST_AI, TEST_SCRIPT, TEST_VEHICLE_WHEEL, GLASS, MAP_RIVER, SMOKE, UNSMASHED, MAP_STAIRS, MAP_DEEP_SURFACE</CompositeFlags2>
</Item>

https://anonymfile.com/ZQBp/prop-blpuddle01.ydr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant