Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Baby 3D Plugin for Construct 2

Make 3D games in Construct 2 powered by Babylon.js · By Pixel Rebirth

Heightmap troubles

A topic by Blueredgray created 89 days ago Views: 59 Replies: 3
Viewing posts 1 to 3

Hi, I am running the Baby3d plugin for the first time and have encountered issues with the Heightmap behavior: 

1) When attempting to open baby3dHeightmapExample.capx, the Construct 2 opens completely without error. I noticed that there is no Animations folder inside .capx, but I don't think that's the problem...  

2) After adding behavior to objects of different types, even after "Apply vertex light": 

Sprite:

Uncaught TypeError: Cannot read properties of null (reading 'data')
    at Object.Wo [as CreateGroundFromHeightMap] (babylon.js:1:2695797)
    at instanceProto.addHeightmap (baby3d_plugin.js:894:36)
    at behinstProto.onCreate (b3dHeightmap_behavior.js:149:28)
    at Runtime.createInstanceFromInit (preview.js:3522:11)
    at Layer.createInitialInstances (layout.js:1541:25)
    at Layout.startRunning (layout.js:234:10)
    at Runtime.go_loading_finished (preview.js:2205:36)
    at Runtime.go (preview.js:1873:9)
    at preview.js:1949:29

Tiled Background & Tilemap:

Uncaught TypeError: Cannot read properties of null (reading 'length')
    at instanceProto.vertexColor (baby3d_plugin.js:3020:33)
    at Acts.vertexLight (b3dHeightmap_behavior.js:370:27)
    at Action.run_object (eveng.js:1848:10)
    at EventBlock.run_actions_and_subevents (eveng.js:931:38)
    at EventBlock.run (eveng.js:888:9)
    at Runtime.executeSingleTrigger (preview.js:5031:10)
    at Runtime.triggerOnSheetForTypeName (preview.js:4950:16)
    at Runtime.triggerOnSheet (preview.js:4877:13)
    at Runtime.trigger (preview.js:4859:12)
    at Layout.startRunning (layout.js:413:17)

Dear Pixel Rebirth, please double-check the export of this behavior's files in the latest releases. I am getting these errors on different devices, so the problem is somewhere in the plugin...

Developer (1 edit)

There was a breaking change in 0.93 that indeed affects the heightmap example which I already fixed but neglected to include in the release zip. Oops.

However I did just now upload the fixed version as an additional file dowload. Please try and see if this fixes your issue.

If you're using projects of yours that have been created before 0.93 you might have a similar issue with those unfortunately. Please let me know and I can probably fix it for you by editing the project event xml file(s) or explaining to you more in depth how to do so yourself.

Hurray! It worked, thank you very much! Pretty traveling cube! Yes, now I understand how to initialize the height map correctly. I will continue to learn about this plugin, master!

Developer

Hehe, glad it worked out for you. Keep going!