# Geometry-cache meshes for streaming-sector collision nodes

## Requirements

* [WolvenKit](https://github.com/WolvenKit/WolvenKit)
* [RedHotTools](https://github.com/psiberx/cp2077-red-hot-tools)
* [World Builder](https://github.com/Oxion/cyberpunk2077_entSpawner) (with geometry-cache meshes for streaming-sector collision nodes, available in linked fork as of now)

### Knowledge

* Basic understanding of:
  * How to work with WolvenKit, RedHotTools and World Builder
  * Data structures which are used in game world implementation, like [.streamingsector](https://wiki.redmodding.org/cyberpunk-2077-modding/for-mod-creators-theory/files-and-what-they-do/file-formats/the-whole-world-.streamingsector)

### Step 1: Resolve PhysX mesh identifiers in the geometry cache

{% stepper %}
{% step %}
**Enable Game Physics targeting mode in RedHotTools World Inspector.**

<figure><img src="/files/I5OkAl3OiiAK3aQprRXX" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Target the desired object in-game.**

In World Inspector, note the **streaming-sector file name** and the **node definition index** within that sector.

<figure><img src="/files/uqam2v45afx9O8XFgvlh" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Find and open the streaming-sector file in WolvenKit.**

<figure><img src="/files/tuxGcHw83kor51K0PnLN" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Find the node whose index matches step 1.2.**

<figure><img src="/files/VTz08VtvhBbN32S67CeV" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Locate the `sectorHash` field on that node.**

You will enter this value into the World Builder collider Sector Hash parameter.

<figure><img src="/files/8BratM4PM2tAFHBSvL0g" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Open the sector preview tab in WolvenKit**

find the node with the index from **step 1.2** in the nodes tree.

<figure><img src="/files/W1jHxUmG2el8lbp92Yze" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Search for exact collider which represents object**

Use the visibility toggle to find the tree entry (and its index in the name) for the actor that represents the collision of the targeted object.

<figure><img src="/files/heF8oAwTPNgrR09UrQqg" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Return to the sector data tab.**

Under `compiledData` → `Actors`, open the actor whose index matches step 1.7. Expand Shapes, then the first item. The fields you need are `Hash` and `ShapeType`; use them for the World Builder collider parameters.

<figure><img src="/files/z5s9HnMQrenewQWwHkiT" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

### Step 2: Create the collider in World Builder

{% stepper %}
{% step %}
**Spawn the desired mesh object and add a simple collider for it.**

{% hint style="warning" %}
**Important:** the mesh object and the collider must be in the same group at the same hierarchy level.
{% endhint %}

<figure><img src="/files/pX6eJzyGragdY23Ul2Ta" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Enabling PhysX mesh for collider**

Select the collider, enable **`PhysX Mesh`** (the `PhysX Mesh Settings` section appears), and expand it.

{% hint style="info" %}
With PhysX Mesh enabled, the simple collider shown in-game is only for editing; it is not exported. The PhysX mesh is what gets exported.
{% endhint %}

<figure><img src="/files/k9vBl3U2SiXSyo28PgzL" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Set the PhysX mesh parameters**

* **Target name:** name of the object you are attaching the collider to
* **Sector hash:** value of the `sectorHash` field from step 1.5
* **Actor Shape Hash:** value of the `Hash` field from step 1.8
* **Actor Shape Type:** value of the `ShapeType` field from step 1.8

<figure><img src="/files/fOGteoannmuN7ea95Y3o" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki.redmodding.org/cyberpunk-2077-modding/modding-guides/world-editing/object-spawner/features-and-guides/geometry-cache-meshes-for-streaming-sector-collision-nodes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
