I was thinking of extending a Ray to add some optimization data along with it, but apparently since it implements Savable it has to be final for some reason, throwing that out of the window.
Then I tried copying the class in whole and changing the name, but then it’s no longer classified as a bounding volume somehow?
com.jme3.collision.UnsupportedCollisionException: Collidable:WeaponRay [Origin: (15.484375, 7.675293, 2.125),
Direction: (0.7961645, -0.17364807, 0.5796278)]
at com.jme3.collision.bih.BIHTree.collideWith(BIHTree.java:476)
at com.jme3.scene.Mesh.collideWith(Mesh.java:998)
at com.jme3.scene.Geometry.collideWith(Geometry.java:450)
at com.jme3.scene.Node.collideWith(Node.java:611)
at com.jme3.scene.Node.collideWith(Node.java:611)
at com.jme3.scene.Node.collideWith(Node.java:611)
at com.jme3.scene.Node.collideWith(Node.java:611)
at com.jme3.scene.Node.collideWith(Node.java:611)
at particle.rayprojectiles.RayAbstract.rayCast(RayAbstract.java:51)
at particle.rayprojectiles.RayAbstract.cycle(RayAbstract.java:32)
at mainpkg.CPU.effectmanagment(CPU.java:1011)
at mainpkg.CPU.simpleUpdate(CPU.java:756)
at com.jme3.app.SimpleApplication.update(SimpleApplication.java:239)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDisplay.java:151)
at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:193)
at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.java:232)
at java.lang.Thread.run(Unknown Source)
So, any way to accomplish this without making a too convoluted outside system? Thanks!
P.S. If you’re wondering what data I planned to add, it’s the “shooter” node that created the projectile casting the ray so I can check if the node doing the collideWith can ignore the collision with the ray completely. But well, not exactly that important in regards to the issue.