Hi,
I want to get the geometry from my loaded object for my PhysicsNode. The problem is that the getMesh() method is not a member of Spatial. This is my code:
Spatial snowboard = (Spatial) assetManager.loadModel("Models/player_1/player_1.mesh.xml");
PhysicsNode physicsMesh=new PhysicsNode(snowboard,new MeshCollisionShape(snowboard.getMesh()),0);
getParent().attachChild(snowboard);
getPhysicsSpace().add(physicsMesh);
Thanks in advance.
usually a loaded object is a Node,
then you can use getChildren(0).getMesh or similar.
You can create a physics node from a regular node/spatial. See the TestQ3 test class in jME3 on how to do that.
I've found it. It works now.
Thanks.