Hi Everyone
So I’m building a racing game and a car is going to be used. So I’m using the vehicle control. So I’m cool with the way the controls and physics work. My problem is that flyby cam. This is causing me problems, as my track is a floating track. The camera is right behind the car and I can’t see what the car is doing or what is coming up in the track. So I have tried to make a chase cam work, but I can’t do it.
So the current flyby cam settings are
[java]
private void loadCamera() {
cam.setFrustumFar(150f);
flyCam.setMoveSpeed(20);
flyCam.setRotationSpeed(30);
flyCam.setDragToRotate(false);
}
[/java]
So I have tried to make the chase cam work by using the private vehicle control and the private nobe
[java]
private ChaseCamera chaseCam;
private VehicleControl player;
private Node carNode;
private void loadCamera(){
flyCam.setEnabled(false);
chaseCam = new ChaseCamera(cam, model, inputManager);//All my settings are put into this
}
[/java]
So can someone just give me a idea how to attach the chase camera to the vehicle control or the carNobe.
Thanks
spatial.addControl(chaseCamera);
Where spatial is the car node
1 Like
Thanks, that work