# Collision for a line?

**URL:** <https://forum.kirupa.com/t/collision-for-a-line/228436>\
**Category:** Uncategorized\
**Created:** [June 7, 2007, 6:42pm UTC](https://forum.kirupa.com/t/collision-for-a-line/228436 "2007-06-07T18:42:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pattt](https://avatars.discourse-cdn.com/v4/letter/p/f1d935/32.png) [@Pattt](https://forum.kirupa.com/u/Pattt)\
**Post date:** [June 7, 2007, 6:42pm UTC](https://forum.kirupa.com/t/collision-for-a-line/228436/1 "2007-06-07T18:42:51Z")

</div>

Okey, I have two particles (mc’s) that are linked together to a line. Both particles use xspeed and yspeed when they are moving.

Then to my question… how will the particles xspeed/yspeed change when the line collide into another movieclip?

I know how I can check the collision, but I don’t know how I’m going to change the speeds.

I have to use (in the very collision moment);

particle\_1’s xspeed/yspeed  
particle\_2’s xspeed/yspeed  
the lines rotation  
the direction the line came from  
the length of the line  
where on the line it collides

Please help!
