Move object

Ok, So I wanna do a 3d version of Pong ( for entertainment and practise )

going quite well ^^ Have rendered 5 white objects in a black area.
(walls + paddles + ball)

Is there any move function like D3DXMatrixRotY ( something like that )

so I can move the ball =D

please help



Answer this question

Move object

  • Zaph0d

    I would take a gander across Google, Google Newsgroups and GameDev. There should be plenty of articles on collision detection in numerous languages. On the other hand collision detection for 6 spheres should be pretty simple if you apply a bit of trig.

  • MalcolmB

    Thx alot!

    How do you easiest detect collitions

    thx

  • Gordon Pollokoff

    In DirectX movement like this is done by setting the WorldMatrix right before you draw the object.

    So use D3DXMatrixTranslation to set the x,y,z position of the ball. Note that this assumes that the center of your ball is at (0,0,0) on the ball shape.

    Then set the world matrix using SetTransform(D3DTS_WORLD, .... ) call.

    For animation across the x axis for example, each frame you vary the x coordiate a little.

  • Move object