Question about PhysicsCharacterNode and PhysicsCharacter

I just updated the engine and i have a little problem here , i used until now PhysicsCharacterNode to define the physics propriety of my spatials , i just saw that thoses things are deprecated and i have this error at compilation :



com.jme3.bullet.control.CharacterControl cannot be cast to com.jme3.bullet.objects.PhysicsGhostObject

at com.jme3.bullet.nodes.PhysicsCharacterNode.setLocalTranslation





Is that normal that the deprecated functions are not working anymore ? or do i have an issue ? It seems that the issue appear with a settranslation on my physicscharacternode



[java]

model.physiquenode.settranslation(X,Y,Z) // that’s what i did until now with physiquenode a PhysicsCharacterNode object from another class

[/java]



Thanks in advance !

Yeah, physics has changed a lot and since you were using it kinda wrong anyway you might have problems.

Try

physicsNode.getControl(CharacterControl.class).warp(newLocation);

or

physicsNode.getControl(CharacterControl.class).setPhysicsLocation(newLocation);

I committed a fix for the cast exception, for updated manuals look in the wiki, the hello physics and most other physics documents have ben updated already.

how do i download the fix ? i’m sorry i usually never do this



P.S : my comment on the first post was not complete , physiquenode is an object from PhysicsCharacterNode