Vertex parenting

Hey, :wink:

I’ve got a bit of a problem. I have a camera parented to an empty. Thats because the camera needs to be able to rotate.:spin:

Now, I want the camera to switch between a parent to a vertex parent. At first, I already don’t know how to vertex parent something to a mesh while the game is running… And second, you can’t vertex parent anything to a empty. (As far as I know)

Now, I could change the empty into a mesh, use 2 different camera’s and switch between them. But I really hope there is another way cause I have way more things parented to the camera etc. etc. So I would have to do lots and lots of work to get everything done.

So really hope anyone knows an answer. =]

Thanks a lot. :yes:

Attachments

Camera test.blend (873 KB)

You could add another empty vertex parented to the object.
Then the camera could be parented to this empty (vertex parented) or the object.
Does that help?

Sorry for the late reply. That I didn’t think of that lol xD. The only problem is that he can’t rotate left/right.

I’m not sure exactly what you’re trying to accomplish.
What kind of controls are you aiming for?
What’s the gameplay going to be like?

Instead of rotating the cube with the keys, maybe you should only use the mouse for rotation and switch between rotating the empty and the cube.

I messed up your file a little bit and this is what I got.
I’m not sure if it will help you any, I added another script to snap the camera back behind the player when you let go of the mouse button.

Maybe someone else can help:)

Attachments

Camera test 3.blend (880 KB)

Wow, you’re smarter then I thought. xD

I found almost simmular to what I wanted thanks to you. :stuck_out_tongue: When the game is a little bigger I’ll add the same thing you just gave me aswell. :slight_smile:

So thanks a lot!!! :yes: