Weird problem!?

Hello, I have setup a camera that is following the main character using a camera acutator. But I know the camera isn’t following the players rotation 100%. So I want to make the camera be able to rotate around the player.

These are the controls:
w-forward
s-backward
d-turn right
a-turn left

e-rotate the camera around the player to the right.
q-rotate the camera around the player to the left.

So the center of the camera is the player. And it’s rotating around this spot, but now my question is. How would I make the camera center point be where the player is. And does the rotation thing even work when the camera acutator is active?

Thanks for your help, I hate this bloody camera!!!:stuck_out_tongue:

Also the camera acutator only follows eiter the y or the x axis. Isn’t it possible to somehow make it follow the back of the character. Like if you got a invincible cube as a bound, could you follow one of the cubes sides only and not the y x axis?

And does the camera acutator even detect collisions :o it seems like it’s not…

if you want to have your camera always at the back of the main character:
why don’t you just make the camera a child of the main character?

if you also want to move the camera with your keybord:
make an empy at the same position of the main character and parent the empty to the main character, parent the camera to the empty. now make logic to rotate the empty on keyboard command, the camera wil now be able to turn around the main character

if i where you i would not use the camera actuator

Here are the choices:

*Use the camera acutator
Good - Because it makes it possible to view the character from 360 degrees, and it is not as stiff as if you would only parent it.
Bad - The camera doesn’t detect collisions and the camera will only face either the x or y axis. Not behind the model.

Question: How would I make the camera detect collisions with the acutator and how would I make it face the back of the character.

*Parent the camera
Good - Because now I got alot of more control over the character, it does follow the back of the character. And goes with the rotation of the character, the delay you can have on the camera is a nice touch.
Bad - Because the camera doesn’t detect collisions, and it’s not as smooth. It doesn’t have a max hight and distance to the object. And you can’t see the character from a 360 degree.

Question: How would I make the camera detect collisions, and how would I make the 360 degree thing possible. When I say the 360 degree thing, I mean to be able to rotate the character all around and when u release the key the camera goes back to the back of the character…

And I have tried a few tutorials, but none of them works. They are probably outdated or something. And one of them is very poorly written…I’m new to the logic brick system and I know nothing about the python.

Here is the tutorial I have followed and can’t get to work.
http://www.blending-online.co.uk/8501/49279.html

If you know how to fix the problems please tell me.
Zarnik;)

mmm, i think you didn`t understand me good (or the other way around:p)
here is an example i made
http://www.4shared.com/file/77963530/9842f4c/example.html
use q and e to turn around the cube and w a s d to move the cube
this is what you wanted right?
about collisions: if you make one object dynamic it can detect collisions with the collision sensor. but why do you want the camera to detect collisions?

Yes thanks for your try. But that is not quite what I’m looking for, but thanks for the tip about the empty. That will come in handy…:eyebrowlift:

I want the camera to detect collisions so it doesn’t go through walls. So you cant see what is inside mountains etc…that is unrealistic. So if I’m now gonna use the parent alternative, I need to know how to get the thing to detect collisions. Does anybody know of a way to do this???

Btw is there no 3rd person template??? O.o

you could use 3 emptys. one on each side of the camera and one behind it, give the 3 emptys a ray sensor and you have your collision sensor

Really:eek: But how would I use the ray sensor to avoid walls from all directions?
Sorry I’m not so good with logic or Python, thanks for your help;)

how can there be wall`s from other directions? your camera is always pointing towards your char… think about it;)
you can set a few things on a ray sensor:
at first the axis this is the direction the sensor is pointing to
and at second the distance: how close the wall in the given direction can come before the ray sensor is activated

Ok, but what should the sensor trigger? What acutator?:spin:

mmm, no idea, you wanted to detect camera collision:p i gonna sleep over that

>_> Damn, I thought you knew. If you find out please give me a pm or something:eyebrowlift:
Anyone else?

maybe use a motion actuator to move it in the opposite direction of the wall.

I thought of that too, but how much should it move? I guess it would have to be moved with force…but how does the motion acutator know how much it should move in the opposite direction of the wall?

It should just keep moving until it’s far enough away that the ray is not triggered.

Hmmm…wait I’l make a test blend.:slight_smile:
EDIT: Could anyone else make one? My knowledge is not enough in this case :stuck_out_tongue: