Controller Confusion

I have a bunch of Spatial Controllers that individually effect position or orientation.

For the moment, lets just talk about the position ones because if I can get one workign I shoudl be able to get the other.

All these controllers are static, in that they have a single key frame.  When applied they set the position of the spatial and thats it.

Each controller effects only one Spatial.

All the controllers are attached to a single node thats attached to the root of my geometry tree.

This is the code that sets them up. It does everything but attach them to the tree which is done in a routine that calls this code:

In the case  I'm talking about data.length == 1:

            SpatialTransformer sptrans  = new SpatialTransformer(1);
            if (data.length==1){ // static
                        new Vector3f(data[0][0],data[0][1],data[0][2]));
            } else {              
                for(int i=0; i< timeKeys.length;i++){
                            new Vector3f(data[i][0],data[i][1],data[i][2]));
            return sptrans;

Currently they don't seem to be having any effect at all.  What am I missing?

Okay. i dont get it.

ive been all through the  spatial controller test app.  Ive stripped it down to where its just like mine.  it continues to work, mine doesnt.

I think imgoing to have to write  my won controller so i cna debug into it and figure out whats going on :frowning:

jeffpk said:

I think imgoing to have to write

alright I think its more complex.

I think my geometry is stil off somehow

did u call updateGeometricState in ur update method in the main game loop?

Nope. I'll try that.  Thanks!

I dont currently have an update cuas e im using SimpleGame. but I guess I need one?

jeffpk said:

Nope. I'll try that.

Looking at TestSpatialTransformer in the JME source, the one thing I can see there that you have not mentioned, that jumps out at me is model bounds on the objects the controllers are attached too. Have you set them up?



It's not necessary that anything be added to the update/simpleUpdate method since when running inside the controller you're essentially running in the update method already.  A call to updateGeometricState and updateRenderState might make a difference though.

Where are you attaching your controllers to nodes?

Basically it looks like this…


As long as the Controller is actually getting called that should be fine.

Arligth neither of those helped.

I crated a controlelr that jhust reports itself beign called and controllers ARe being called.

Im going to double check that my target is right and then Im a bit stumped.

Are there permissions for nodes in JME liek there are in J3D and do i have to set something to make a node transformable by the controller?

All seems to be pointing at the right stuff :frowning:

Im really at a loss here. has anyone actually TESTED spatial transformers where they have only one time key?


Thats not it either cause i tried putting the right valeus at 1f and 0,0,0 at 0f and it still did nothing

what locks have you called on the node that is supposed to move?


I'm not much help since I have yet to use spatial transformers.

Someone else will respond I'm sure…HEY, SOMEONE ELSE RESPOND!  :stuck_out_tongue:


In fact I checked in the debugger and the locks field is 0 :frowning:

I thin ktonight Im going to try multiplying my transformation vector by 100 just to see if myabe its a units problem in how im understanding the data…

I should mention I geuss that my target isnt the actual geometry but a Node above it.

This is so it can have children, mehs nodes have to be leaves

jeffpk said:

alright I think its more complex.

I think my geometry is stil off somehow

whats more complex?

and what do u mean ur geometry is still off? :?