Skip to content

Commit

Permalink
Add info on importing before not after
Browse files Browse the repository at this point in the history
  • Loading branch information
Joeclinton1 committed Dec 2, 2023
1 parent d5dfc37 commit 184d664
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ Once you've finished designing your game scene in Blender, export it as an .obj

### Importing your mesh

Now that you have your beautiful .obj file, let's bring it into your ChromeEngine game. To do this we can use the `import_from_OBJ_file` block:
Now that you have your beautiful .obj file, let's bring it into your ChromeEngine game. To do this we can use the `importFromOBJFile` block:

<ScratchBlocks>
{`
GameObjects.import_from_OBJ_file \\( CW orientated? <> scale [1] align_center <> .obj file data \\(leave blank if using _OBJ list\\) []\\) :: custom
GameObjects.importFromOBJFile \\( CW orientated? <> scale [1] align_center <> .obj file data \\(leave blank if using _OBJ list\\) []\\) :: custom
`}
</ScratchBlocks>

Expand Down Expand Up @@ -116,4 +116,17 @@ Here's an example of how it should look:
{`
Materials.importFromMTL\\(.MTL file data [your file data goes here]\\) :: custom
`}
</ScratchBlocks>

put this block BEFORE the importFromOBJFILE block!

## importFromMTL must come before importFromOBJFile

Inorder for ChromeEngine to know that your obj file has valid textures you need to run the importFromMTL block BEFORE you run the importFromOBJFile block

<ScratchBlocks>
{`
Materials.importFromMTL\\(.MTL file data [your file data goes here]\\) :: custom
GameObjects.importFromOBJFile \\( CW orientated? <> scale [1] align_center <> .obj file data \\(leave blank if using _OBJ list\\) []\\) :: custom
`}
</ScratchBlocks>

0 comments on commit 184d664

Please sign in to comment.