November 12, 2018, 11:07pm
Hi, i had this code that worked fine, now it doesn’t anymore, any clue?
The problem is that the old terrain is not deleted but is kept also when terrain respawn as the removeComponent doesn’t work
var img = app.assets.get(this.heightMap[this.lM]).resource.getSource();
var model = this.createTerrainFromHeightMap(img, this.subdivisions);
var collisionModel = this.createTerrainFromHeightMap(img, this.subdivisions / 2);
this.entity.model.model = model;
this.entity.collision.model = collisionModel;
November 12, 2018, 11:11pm
Any error message? Anything in console? What do you mean by ‘doesn’t work anymore’?
November 13, 2018, 9:39am
No error messages. I put some beakpoint in code and it seems to work but when it run the old terrain isn’t deleted as it should, the rigidbody and collision body are removed but the terrain itself is always shown (before it vanished and haven’t changed the code) so i guess it’s something in the terrain from heighmap that doesn’t work as it should
November 13, 2018, 10:28am
Have you tried using an older version of the engine to see if it was due to changes?
November 13, 2018, 10:45am
Oh didn’t know about this feature, i can try that, where i can find the engine id that was running in july?
November 13, 2018, 11:42am
You can see the release version and dates here:
November 13, 2018, 2:19pm
Thanks a lot
@yaustar i will post the results by tonight (i hope)
November 13, 2018, 4:56pm
With the version 1.8.0 it worked fine with following no
to test. In game when lunched use the m key to open the map click on the town of Foren or Rekdar and use fast travel button when the new terrain open the old one is there or it isn’t according to the engine version used
November 13, 2018, 5:03pm
Errata corrige it happens from 1.8.1 to 1.8.2 and following
November 16, 2018, 9:17pm
@yaustar i have to report this issue in feedback? or you already pointed the problem at developers?
November 16, 2018, 11:07pm
I don’t know if it’s an issue with the engine or the terrain library. TBH, as it’s not a PlayCanvas feature, you would be better off talking to the developer of the terrain library.
November 17, 2018, 6:42pm
I think it’s
@will the developer of the terrain library