Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User icq98hk's Avatar
    Join Date
    May 2003
    Posts
    15
    How can let one object collision with line??
    Eg: Have a line which slope is 2 and the object (ball ) sleep is 5 and then fly toward to that line. how can let it reflect when the object (ball) collision with line??

  2. #2
    Regular Contributor alex_crowther's Avatar
    Join Date
    Aug 2003
    Location
    uk
    Posts
    232
    Your talking about programming physics and collision.

    Search the web, or buy a book, e.g.

    http://www.programming-reviews.com/B...735713901.html

    I don't know much about physics, but I am guessing you need to use things like.

    Equations of motion.
    Line/Sphere intersection equation.
    And then work out angle of reflection, and send the object off on the new vector.

    Basically you are going to have to learn some maths.
    And after that, you will need to learn some more maths

    Alex

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved