A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Dynamically push objects.

  1. #1

    Dynamically push objects.

    I would like something where, say your "hero", lets say it is a space ship, is controlled by the mouse, with a drag. I want so that when it collides with another object, it will push that object. The best example I could find was this: http://homokaasu.org/gasgames/game.gas?20 I'm more looking for line to line detection, not circle. But the main this here is the non-conservation of energy. The object the user is "pushing" doesn't bounce back, it merely pushes the other object. Any thoughts?

  2. #2
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005

    i'd love to help you, but tell me a little bit more about your problem

    what kind of spaceship will you be controlling? is it contained in a small circle like the one in the example or is it more complex?

    what will the other objects look like?

    what exactly will you need line/line collisions for?

  3. #3
    The "space ship" will be like a trapazoid, pushing another trapazoid. The reason why I want line collision is because I want the bottom trapazoid to "fit" into the top trapazoid, and when the top of the bottom trap collides with the inside walls of the top trap, the top trap will move away.

    The whole circle thing was just the best thing that I found were the object you collide with moves immediately away from the object without conservation of energy or momentum. I'm pretty sure I won't be needing anything related to circle collisions. That is, the object doesn't "bounce" away when you hit it, as would a billiard ball.

    If anyone knows of a site or anything that kind of shows this, that would be great.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center