The purpose of this example is to demonstrate the E\+Physics Constraint usage -\/ The code apply a constraint between two cubes.

For this example we\textquotesingle{}ll have an E\+Physics\+\_\+\+World, and two basic E\+Physics\+\_\+\+Bodys.

The basic concepts like -\/ defining an E\+Physics\+\_\+\+World, render geometry, physics limiting boundaries, add an E\+Physics\+\_\+\+Body, associate it to evas objects, change restitution, friction and impulse properties, were already covered in \hyperlink{tutorial_ephysics_bouncing_ball}{E\+Physics -\/ Bouncing Ball}

You can use also a slider constraint\+: \hyperlink{tutorial_ephysics_slider}{E\+Physics -\/ Slider}\hypertarget{tutorial_ephysics_constraint_add-constraint}{}\section{Adding a constraint}\label{tutorial_ephysics_constraint_add-constraint}


Constraint is a specific type of variable in E\+Physics.


\begin{DoxyCodeInclude}
   \hyperlink{group__EPhysics__Constraint_ga6cdc4a630836a63a51489b885c09c7e3}{EPhysics\_Constraint} *constraint;

\end{DoxyCodeInclude}


Here we\textquotesingle{}re working with a point-\/to-\/point constraint, its purpose is to join two bodies limiting their movements based on specified anchors.

After we create our 2 E\+Physics\+\_\+\+Bodys, now we\textquotesingle{}ll add a constraint between them and setting an anchor to first body\textquotesingle{}s Y using a p2p constraint (point to point).


\begin{DoxyCodeInclude}

\end{DoxyCodeInclude}


Here we finish the example. The full source code can be found at \hyperlink{test_constraint_c}{test\+\_\+constraint.\+c}. 