Update the TestWalkingChar.java in the advanced » walking_character wiki (3 posts)

  • Profile picture of durium durium said 4 months ago:

    Hi !
    I’d like to know if it was possible for someone to update the TestWalkingChar.java in the advanced » walking_character wiki because :
    _no suitable constructor found for ImageBasedHeightMap(com.jme3.texture.Image,float)
    constructor com.jme3.terrain.heightmap.ImageBasedHeightMap.ImageBasedHeightMap(java.awt.Image,float) is not applicable
    (actual argument com.jme3.texture.Image cannot be converted to java.awt.Image by method invocation conversion)
    constructor com.jme3.terrain.heightmap.ImageBasedHeightMap.ImageBasedHeightMap(java.awt.Image) is not applicable
    (actual and formal argument lists differ in length) (l.272)
    _cannot find symbol
    symbol: class BombControl
    location: class TestWalkingChar
    I really don’t know what to do for the first error and for the second the BombControl class doesn’t seem to exist anymore…
    Thanks !

  • Profile picture of zathras zathras31p said 4 months ago:

    Hi @durium,

    good catch, I added a link to where you find the missing BombControl.java sample code.

    If the ImageBasedHeightMap doesn’t work, a possible reason could be that the linked source code is for the very latest (nightly) build, and you use an older stable build of jme3.
    The heightmap constrcutor used to be this, maybe that works for you:

    heightmap = new ImageBasedHeightMap(ImageToAwt.convert(heightMapImage.getImage(), false, true, 0), 0.25f);

    But in the long run I’d recommened to update to a more recent version.

  • Profile picture of durium durium said 4 months ago:

    ok thanks !
    It works ! As for my version, i run on the last sdk available and update whenever i can but i prefer not to use the nightly build.
    Thanks !