Author Topic: Suggestions for Next Release  (Read 18882 times)

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #15 on: August 19, 2006, 08:51:45 pm »
I don't understand one part of that first line. For starters, what's the invert for? It works exactly the same without it. And all I seem to get renderered is the bottom of my model. If I move the camera object over the model to try to get its top, even when I rotate the camera object 180 degrees, I don't get anything.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #16 on: August 20, 2006, 09:39:11 am »
A quick update so you what I'm talking about: I can rotate the object, the object's pivot, and even mirror the object but I can't get the camera to face anywhere but up with your code.

What I've done instead is basically just set the camera to the invisible object's position and rotate it separately, but it would really help a lot if I could set a plane as the position of the camera and the camera face towards the plane's normals. I don't mean to ask too much and appreciate your time but if this is possible it would be very of you to show me.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #17 on: August 20, 2006, 09:53:58 am »
Also a final suggestion: Object3D.addChild(Camera). Now that is cool.

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Suggestions for Next Release
« Reply #18 on: August 20, 2006, 11:05:22 am »
The code works for me. It has to be called every single frame of course. Take the car example that comes with jPCT and put this

Code: [Select]
camera.setBack(car.getWorldTransformation().invert3x3());
camera.setPosition(car.getTransformedCenter());


at the very end of the moveCamera()-method and you'll see what it's supposed to do. If you are calling it every frame and it still doesn't work, please provide me with a test case that demonstrates the problem, so i see what's wrong.

About the addChild(<Camera>)...no, that wouldn't be cool, because it makes the camera part of the scene graph, which it shouldn't be by design. If you want that, do it yourself. The code above should do it. If it doesn't, well...then please provide me with the mentioned test case, so i can check this out.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #19 on: August 23, 2006, 12:48:15 am »
Test case sent. Please prove me wrong because the code really doesn't seem to work. Thanks in advance.

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #20 on: August 23, 2006, 09:15:02 pm »
Did you see it yet, Egon? Any suggestion?

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Suggestions for Next Release
« Reply #21 on: August 23, 2006, 10:37:44 pm »
Hi, I just have downloaded your code and barely checked it, I never have done something like a follower. And I have been bussy, but as now I am bored on my job lets see.

I could see you are calling to follow on each iteration

just set the cam position and after that move it the 600 units, I dont know why do you the 2 last lines of code.

I may check it on my house today.

So, which behaviour do you got?
Nada por ahora

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #22 on: August 23, 2006, 11:15:33 pm »
Sorry about the confusion: what I sent you was just a quick-and-dirty little program in which the x-Wing doesn't even turn around. But you have to imagine the camera following the x-Wing turning constantly on screen.

Offline Melssj5

  • double
  • *****
  • Posts: 724
    • View Profile
Suggestions for Next Release
« Reply #23 on: August 24, 2006, 06:19:05 pm »
Egon wont be here until 28th, in fact he disconnected just a few seconds before you sent the mail. bad luck I guess, but I suggest this.

do this on any iteration:

camera.setPosition (xWing.getTranslation ());

camera.moveCamera(Camera.CAMERA_MOVEOUT, 600);

camera.lookAt (xWing);


and  thats all, it should work. I cant test it bt is an idea. I couldnt check your code on my house . Hope this help.
Nada por ahora

Offline AGP

  • quad
  • ******
  • Posts: 1726
    • View Profile
Suggestions for Next Release
« Reply #24 on: August 24, 2006, 07:41:27 pm »
Try it out. If it worked I would have done it. Trust me, following is complicated. But I appreciate the suggestion.