I have drawn 5 tentacles which are shown in red. I have drew those tentacles on a 2D Circle, and positioned them on 5 vertices of the that circle. BTW, The circle is never be drawn, I have used it to simplify the problem. Now I wanted to attached that circle with tentacles underneath the jellyfish. There is a problem with the current code but I don't know what is it.

You can see that the circle is parallel to the base of the jelly fish. I want it to be shifted so that it be inside the jelly fish. but I don't know how. I tried to multiply the direction vector to extend it but that didn't work.

// One tentacle is constructed from nodes
// Get the direction of the first tentacle's node 0 to node 39 of that tentacle;
   Vec3f dir = m_tentacle[0]->geNodesPos()[0] -  m_tentacle[0]->geNodesPos()[39];

    // Draw the circle with tentacles on it

    Vec3f pos = m_SpherePos;


    for (int i=0; i<m_tentacle.size(); i++)


 // Draw the jelly fish, and orient it on the 2D Circle
    Quatf q;
    // assign quaternion to rotate the jelly fish around the tentacles
    // tanslate it to the position of the whole creature per every frame

    // draw the jelly fish at center 0,0,0 


1 Answer 1


I think you want to move the "circle" position along the line defined by dir.

Vec3f pos = m_SpherePos + dir.Normalise() * -10;

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .