Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Wojtek

Pages: 1 [2]
Support / Camera UP vector
« on: August 11, 2009, 10:47:20 pm »

I would like to allow player to move camera around the player's ship to see it from different perspective.
The following image shows what I am planning to do: .

First I have tried to use Camera.lookAt() method, however when I run the game it does not work as I wanted.
It is difficult for me to explain why, so i attached 3 screenshots showing how it works with lookAt() method:

What I want is not to see the effect of rotating ship, but have the effect that player is 'flying' around the ship.

After that I have started playing with Camera.setOrientation() method. I am using following code to calculate direction vector:
Code: [Select]
SimpleVector direction = object.getTransformedCenter();

It seems to work for me, however I have no idea how to calcluate up vector. If I understand it correctly its purpose is to show the direction where is the 'sky' so it suppose to be a perpendicular vector to direction vector (I have showed it as a small blue line at the first picture). I am trying to make it work a second day but without result :( Can anyone help me and give a hint how to calculate it?



I am newbie in 3d rendering and jpct engine, so excuse me for naive questions, but I am wondering how to specify what part of object (or which objects) should glow/shine.
I have created a simple gray space ship with blue cockpit window and light-blue engine. The ship does not have any texture - I have just specified colors for it's parts in blender.

I wanted to make the ship's engine glowing, so I have added the BloomGLProcessor to FrameBuffer as a post processor. When I ran the application I have noticed that the cockpit window is also glowing (in fact, it is glowing more than the engine).

Can you please give me some hints what should I do to avoid the situations where unwanted parts of objects are glowing?

Here I added the link to my test application:


Pages: 1 [2]