Hello! i was wondering if I can take the particle emmiter from HelloEffects Tutorial and make the fire follow a path. Is it possible to add ghostControl to a particle emmiter?
I have done this so far with no results…
[java]
ghostControl3 = new GhostControl(new CapsuleCollisionShape(2.8f, 5f, 1));
//model3 = (Node) assetManager.loadModel("Models/Oto/Oto.mesh.xml");
//model3.scale(0.8f);
fire.setLocalTranslation(2.8f, 5f, 1);
fire.addControl(ghostControl3);
ghostControl3.setCollisionGroup(PhysicsCollisionObject.COLLISION_GROUP_02);
ghostControl3.setCollideWithGroups(PhysicsCollisionObject.COLLISION_GROUP_02);
ghostControl3.setPhysicsLocation(new Vector3f(0, 30, 20));
getPhysicsSpace().add(ghostControl3);
//animationControl3 = fire.getControl(AnimControl.class);
//animationChannel3 = animationControl3.createChannel();
//animationChannel3.setAnim("Walk");
path2 = new MotionPath();
path2.addWayPoint(new Vector3f(-48.282944f, 4.5f, -211.32246f));
path2.addWayPoint(new Vector3f(-48.905025f, 4.5f, -192.71219f));
path2.addWayPoint(new Vector3f(-48.85733f, 4.5f, -136.35065f));
path2.addWayPoint(new Vector3f(-49.4516f, 4.5f, -39.415718f));
path2.addWayPoint(new Vector3f(-49.61303f, 4.5f, 37.372147f));
//path2.enableDebugShape(assetManager, rootNode); //Make our path visible
motionTrack2 = new MotionTrack(fire, path2);
motionTrack2.setDirectionType(MotionTrack.Direction.Path);
motionTrack2.setEnabled(true);
[/java]
Both is possible but it hasn’t got much to do with each other?
Edit: What “results” do you expect from that? The fire now has a ghostcontrol that you can check for overlaps…
i mean that it shows me error when tying to execute… and i dont know what is wrong
hm… nothing…?
Well then posting the error would help.