CameraNode or ChaseCamera

Hello!

What is the difference between camera node and chase camera?

And If I want to make my game first-person, what camera should I use?

And another question. I am creating en enemy which works fine but I don’t understand one thing. I have this line:
model is a spatial

model.setLocalTranslation(0f, -1f, 0f); 

and then I have:

 characterControl.setPhysicsLocation(new Vector3f(1f, 3f, 1f));

So what is the setlocaltranslation actually doing?

Ultimately you will more than likely make your own version of the chase camera. Chase cam, fly cam, or anything camera related are just camera manipulation methods, and you will probably want to look at the code to see how they do things when you want more control.

If you want to make something first person type, take a look at how hello collision does it. http://wiki.jmonkeyengine.org/doku.php/jme3:beginner:hello_collision

Regarding setlocation, you set the physics location on a physics control, and setlocation on a non physics object.

Ok thanks for answering! Do you know where I can find something with first person camera? I have searched but really didn’y find anything.

Regarding setlocation, you set the physics location on a physics control, and setlocation on a non physics object.

Okey but I use chatacterControl.setPhysicallocation. Do you mean that it is wrong?

I edited my original post, you ninjad me :stuck_out_tongue:

You are doing it right. Once you have added a physics control to the scene, set its physics location.

hahaha okey thannks :smile:

another question, I’m using camera node and ninja.mesh.xml with third person and can move, playanimations and jump and avertything. And then I added an enemy with the same capsulecollitionShape. So the funny thing is that I can wolk through him like he was a ghost. But he is not falling through the ground or anything so why is that :slight_smile:

Try enabling debug mode to see the collision shapes. Better physics debug view added to Engine

Also seeing your code helps if you’re still stuck.

Thanks, I don’t thing the shapes are wrong because I made the enemy spawn in the air and land on the top on the house, and enemy landed on the roof exactly like the player character do (me). So we can not collide with each other so it is weird, but I will take a look in the jmonkey book!

Thanks for helping out :slight_smile: