# Making and Colliding with Curves

I really have a couple of questions to ask. The first one is if you think that a pinball game could be made since that is what I’m planning to do. The next is that if there is an easy way to create a curved line (I would suppose with bezier but I I’m not sure how to turn that into geometry). The last is how to detect collision with that curve once it is made and to make the pinball realistically bounce off that curve (the ball should have proper physics like gravity). I’m sure it can be done and I have thought of some ways to do it and they aren’t very good and not very OO either. Any help would be appreciated.

Btw, is the javadoc up to date? I was looking at the intersection and it shows collision between two bounding volumes. With a curve that would be rather weird… And I know there is a way to use Triangle Collision, just not sure how to find out how.

[EDIT] I was wondering if ODEjava would be useful to accomplish what I am trying to do?

Collision and curves isn’t all that workable in jME, as the curves in jME are somewhat abstract (more for things such as camera control and such). I would suggest building a three-dimensional Pinball machine, with the bumpers and stuff as TriMesh objects. Then you can use jME’s collision or use odejava if you choose.

Building your pinball machine out of three-dimensional models will give you much more flexability.

Alright, that sounds good. I was planning to build the edges of the pinball machine out of curves, but I guess I’ll have to simplify it. Are there any good resources that I could look up to learn about TriangleCollision? That seems like what I will need to be using. And for the physics of rebounds and gravity and such, any suggestions?

I was wondering regarding Trimeshes, if I wanted to make more complex objects, would I have to specify all the points, or is there an easier way. It wouldn’t be too much trouble, just to have an object look right seems more hit-or-miss kind of thing.

You should use some kind of modelling program to build your scenery part by part. (google for one that can export something jME can load)

Basically You build the parts of Your scene like bumpers, ramps, … there then triangulate and texture them and export as for example .obj

At last convert to .jme, load them in and arrange ( You can maybe arrange the parts by one of the jme - scene - editors )

hth

Martin

Alright, that sounds like something I could do. Thanks for the help.