calculate the direction of collision. help!!!
![imbrendino](http://forums.gamesalad.com/applications/dashboard/design/images/defaulticon.png)
Hi,
how can I calculate where it comes from the collision in a rectangular shape?
how can I calculate where it comes from the collision in a rectangular shape?
Comments
Matt
On the rectangular shape make two constraints
Constrain "X" to "self.position.X"
Constrain "Y" to "self.position.Y"
In the actors on the sides of the rectangular shape
the one on the left-
Constrain "self.position.X" to "X-???"
Constrain "self.position.Y" to "Y"
the one on the right-
Constrain "self.position.X" to "X+???"
Constrain "self.position.Y" to "Y"
the one on the top-
Constrain "self.position.Y" to "Y+???"
Constrain "self.position.X" to "X"
the one on the bottom-
Constrain "self.position.Y" to "Y-???"
Constrain "self.position.X" to "X"
The amount you add or subtract will change to off set
Hope this helps!
_______________________________________
Game making service- http://gamesalad.com/forums/topic.php?id=21739
Sketch to vector service- http://gamesalad.com/forums/topic.php?id=21820
"Power Orb" style template- http://gamesalad.com/forums/topic.php?id=22179