Camera height on first person controller

Hi to all, it’s very funny but i set the center Y of my character controller to -0.8 to have a realistic position of eyes but when i look around my boyancing boat fly away, is there another way to set the eight of camera mantaining center Y = 0?
Obiouvsly i can’t just set more height of character because it will collide with roof…

Why this happend? Probably bouyancy script?

Question 1: “Can I specify the point at which the camera sits on my FPS” Sure, just move the camera. It should just be parented to the collider anyways.

Question 2: “boyancing boat fly awhat?” Not much to go on. You could provide some script for this. It sounds like you are adding upward force with no upward limit.

first of all thanks!

My boat is like an empty box. i attached it to a rotating box to simulate the boat moving in circle, then i added the boyacy script (the one of the community water experiment) to the boat.

  1. Yes the camera is parented with the boat and Moving Platform under Character Motor is set to false because if i don’t do that i got a very strong shaking of the camera.

First, try breaking it into smaller peices… put a camera up, and see what happens to the box on the water… on the water moving in a circle… Eventually you will get the whole thing in place and find out where your steps are going wrong. Perhaps it is just two scripts that don’t like to work together. (A buoyancy script and a smooth follow camera probably wont like each other)

at this time i think i’ve found the problem, even if i deactivate boyancy script and reduced the size of the object the shaking persists.
so i’ve tried two rotating script:

this

and this

but i continue to see huge shaking… other suggestions?

i tryed also to create a new scene with a simple rotating cube , an object (a little cube) parented to it and a camera, it’s shaking… so the problem is the rotation, i need a way to rotate smootly an object…

Post the script for the cube rotation and camera.

To reproduce shacking do this:

Create a cube 10x10 and 1Y for example then assign the script below to it and inthe inspector assign the cube to the script.

var tr : Transform;
function Update() {
 transform.RotateAround (Vector3.zero, Vector3.up, 0.2 * Time.deltaTime);
}

Then create another cube and parent it to the rotating cube, than add a camera upon the rotating one and look how the little cube is shacking.

My camera is a simple fps camera

ok, I made a cube, added the script made another smaller cube and parented it to the first cube, added a camera to the first cube and it doesnt shake… removed a camera from teh first cube and added it to the second cube, and it doesnt shake. What else do you have in your scene?

nothing else… try to leave unparented the camera.
My Hierarchy is very simple:

Rotating cube
—>Cube
Main Camera
Terrain

and it’s shacking.
and i can’t parent the camera with the rotating object in my main project because as you read on the first post if i set the height of the character controller to -0.8 it begin to move up and down

See my test, is little cube shaking?

There is a high probability that this is caused by the small rotational value per frame. Also try parenting the player to the platform. There are a number of problems that can occur on platforms because of that.

tried to increase frame number, nothing! it’s a mess! maybe i have to focus my mind in other way to set the eight of the camera in the character controller…

transform.RotateAround (Vector3.zero, Vector3.up, 0.2 * Time.deltaTime);

0.2 * 0.02 or less is a very small number. That is probably where your jitteryness is coming from.