cameraPositionHelper?

Programing a Camera Control there are examples using “Position of cameraPositionHelper” and “Position of cameraLookHelper”. Where do the Helper-Blocks come from? I don’t have them available!???
Ulla

Hi @drullaha these are items that the person has added themselves and gave them these names for clarification to their use.

I presume they are just cubes added as child to the camera, and then their position/ direction are used for the code most likely because they wanted to use an offset position of sorts;
That being said depending on the usecase, just using the position or direction of the Camera itself might suffice.

If you need extra help let me know, with additional details; Or a remixable version of your coSpace.

Hope to have helped, good luck!

Hi @Luc, thanks a lot for your quick answer!
This is the example I am referring to: CoSpaces Edu :: Character collision
So far I don’t understand the example is programmed and I am not able to deconstruct it so far, that I can understand ist.

@drullaha In the example there are 2 objects attached to the kid (in the object list you can see them if you click the little arrow next to the kid), since these objects are attached to the kid they will automatically move with it. These two objects are as follows;

The “cameraPositionHelper” is a sphere they have added above and behind the kid, as an indication of where they want the camera to be.
The “cameraLookHelper”, is a sphere they added above the kid as an indication of where the camera must be facing at all times.

Then they made a loop that continuously sets the camera to the position of the “cameraPositionHelper” sphere (behind and above the kid), and then turning it to look at the “cameraLookHelper” sphere (slightly above the kid); So that the camera follows the kid along.

Then in the second page the controls to move the kid are initiated, and because of the previously mentioned loop the camera automatically follows the kid, as the helper spheres move along with the kid due to them being attached to it.

I’ve added comments in the code and extra information to this version;

Thank you so much @Luc ! Your answer is very helpful!! :slight_smile:

1 Like

I also noticed the movement of the charater wasn’t working very well, like when walking forward for a while the character would start to turn randomly. I’ve updated my remixed version of the cospace so that this doesn’t happen anymore. (I used setting the local velocity of- instead of pushing the kid forward)