Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); rootNode.attachChild(node3);
Node node3 = PhysicsTestHelper.createPhysicsTestNode(assetManager, new PlaneCollisionShape(new Plane(new Vector3f(0, 1, 0), 0)), 0); node3.getControl(RigidBodyControl.class).setPhysicsLocation(new Vector3f(0f, -6, 0f)); node3.getControl(RigidBodyControl.class).setApplyPhysicsLocal(true);
public VirtualFloor(BasicGoodyCtx bgc, Ident floorUri, Vector3f position, ColorRGBA color, boolean rigidBodyPhysFlag) { super(bgc, floorUri); setPosition(position, VWorldEntity.QueueingStyle.QUEUE_AND_RETURN); // Constants and collision shape below taken from PhysicsStuffBuilder. // How much of this stuff do we want to come from repo instead? Mesh floorBox = new Box(140f, 0.25f, 140f); Plane plane = new Plane(); plane.setOriginNormal(new Vector3f(0, 0.25f, 0), Vector3f.UNIT_Y); if (color == null) { color = DEFAULT_COLOR; } addGeometry(floorBox, null, color, new Quaternion(), new PlaneCollisionShape(plane), 0f); }