jusanthermemory
Newcomer
- Joined
- Dec 12, 2005
- Messages
- 7
Im trying to get my collision detection to work and the picture boxes move in certain directions when they hit each other. Is there anyway to change this code so that It specifies a certain side?
If Me.linkviewer.Bounds.IntersectsWith(enemyviewer.Bounds) Then
Me.linkviewer.Left = Me.linkviewer.Left + 100
Me.enemyviewer.Left = Me.enemyviewer.Left - 100
End If
so if linkviewer hit enemyviewer on the right, linkviewer would go left and enemyviewer would go right and vice versa. same for top
Thanks for any help
If Me.linkviewer.Bounds.IntersectsWith(enemyviewer.Bounds) Then
Me.linkviewer.Left = Me.linkviewer.Left + 100
Me.enemyviewer.Left = Me.enemyviewer.Left - 100
End If
so if linkviewer hit enemyviewer on the right, linkviewer would go left and enemyviewer would go right and vice versa. same for top
Thanks for any help