FiveM Docs
/
Native Reference
API Set:
all
server
client
Language:
raw
lua
c#
js
Part 5 - Collision Editing and Creation
What We'll Cover in This Part
Introduction to collision models
Creating simple collisions in Blender
Exporting and testing collisions in-game
Creating embedded collision models
Editing World Collisions
Open the CodeWalker World View, navigate to the right-side panel, and in the top-left go to the 'Selection' tab to change from Entity to Collision.
Find the collisions you want to edit and copy the .ybn filename when selecting the collision.
Go to Tools → RPF Explorer and export the .ybn as XML.
Import the XML into Blender.
Make any edits you wish, then export the .ybn file.
If you wish to add new collision objects, position them in
World Coordinates
and create a new collision material for each mesh object.
Set the
Sollumz Type
for the new collision object to "Bound Poly Box" under object properties in the Sollumz tab.
Ensure you parent the new collision object to the correct Bound GeometryBVH that has the proper flags.
Export your .ybn file.
Embedded Model Collisions
Select your drawable object, go to Collisions -> Create Bounds, and click "Create Bound."
Select the created Bound Composite and, in the drop-down, change it from "Bound Composite" to "Bound GeometryBVH," then click Create Bounds.
Select the Bound GeometryBVH, and in the viewport, press V and select "Apply Flag Preset."
Create a collision mesh or basic primitive shapes, then parent them to the BVH object and set the
Sollumz types
using the drop-down menu.
Ensure each collision object has the correct Sollumz type (Bound Poly Mesh for geometry, Bound Poly Box for boxes) and a proper collision material.
arrow_back
Previous
Part 4 - Placing Assets & Creating Simple Map Mods