Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

In my players update method I calc the new world matrix then I update a boudingsphere by:

MyBoundingSphere = MyBoundingSphere.Transform(World);

However when the the model's World has moved vertically down MyBoundingSphere moves vertically up?! (i.e. MyBoundingSphere.Center.Y increases instead of decreases);

share|improve this question
    
Please post some more code so we can have a more detailed look. –  r2d2rigo Oct 9 '11 at 19:28
    
Is this 'world' transform a real world transform, or is it some sort of 'delta' transform? If it's an actual world transform, it would cause your bounding sphere to fly away at high speed. –  Blecki Oct 10 '11 at 2:28
add comment

1 Answer

During a BoundingSphere.Transform(Matrix m) operation, the bounding sphere moves in the same direction as m's Translation vector tells it to. Your problem must be elsewhere.

Have you checked that the sphere starts out in the right place? (before the downward movement of the model).

share|improve this answer
add comment

Your Answer

 
discard

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.