Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 

share|improve this question
up vote 1 down vote accepted

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

Vec3f pos = m_SpherePos + dir.Normalise() * -10;
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.