Hi Fabrice,
Thanks for your reply.
Please, correct me if im wrong, but getHeight() is a method of Elevation class isn’t it?. If this is right i can’t use it because what i want to do is to create a “Duplex” flat with stairs and another plain surface upstairs.
I decide to use de AwayPhysics motor, and it works so nice! but have a problem. When i “fall” from a plane to another plane, my “character” goes through the second plane ignoring it and falling constantly.
My solution by the moment is warp the character to some point again.
code:
//Base
var landMaterial:ColorMaterial = new ColorMaterial(0x232323);
landMaterial.lightPicker = _lightPicker;
landMaterial.shadowMethod = new DitheredShadowMapMethod(_light);
landMaterial.shadowMethod.epsilon = 0.13;
var landGeom:CubeGeometry = new CubeGeometry(2000,10,2000);
_land = new Mesh(landGeom,landMaterial);
_scene.addChild(_land);
_landCollision= new AWPCollisionObject(new AWPBoxShape(2000,10,2000),_land);
_landCollision.position= new Vector3D(0,0,0);
_world.addCollisionObject(_landCollision);
//1stFloor
var platform:Mesh = new Mesh(new CubeGeometry(500,10,500), landMaterial)
platform.position = new Vector3D(0,500,0);
_scene.addChild(platform);
var platformCollision:AWPCollisionObject = new AWPCollisionObject(new AWPBoxShape(500,10,500),platform);
platformCollision.position = platform.position
_world.addCollisionObject(platformCollision);
And my character:
[
//POW Mesh
_pow = new Mesh(new CubeGeometry(10,10,10), new ColorMaterial(0xff00ff));
_pow.castsShadows = false;
_view.scene.addChild(_pow);
_fpc = new FirstPersonController(_pow)
var ghost:AWPGhostObject = new AWPGhostObject(new AWPBoxShape(10,10,10),_pow);
_powBody = new AWPKinematicCharacterController(ghost,2);
_powBody.warp( new Vector3D(0,1000,0));
_world.addCharacter(_powBody);
If someone has some idea i will thanks a lot.
—
No idea is stupid. Don’t hesitate to write something if you think some possible solution )
Thanks