I can make a ball bounce around the screen, but how would i make it bounce of of objects, such as other images?
Thanx
Steve
------------------
I can make a ball bounce around the screen, but how would i make it bounce of of objects, such as other images?
Thanx
Steve
------------------
NOTE: This is only for X direction:
(Image1.left + width) <= Image2.left for a right collision
(Image1.left) <= (Image2.left + width) for a left collision
Its basically the same in the Y direction.
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
I think i have a project that might help.... i'll see if i can fish it out...
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts.
Found it - it's by no means perfect, but it should give you a start.
Add a form with some shapes on it called shape (index them).
I also experimented with curves, but that was never finished so i commented it out.
Have to attach the file - too long to post.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts.
if you are trying to do circular collision regions, then
Center(Image1)^2 + Center(Image2)^2 >= (Image1.Radius + Image2.Radius)^2
would define a collision. Center() would give you the X or Y coordinate of the center of the object.
Sorry this is all in pseudocode but it should be enough.![]()
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.
Originally posted by Darkwraith
if you are trying to do circular collision regions...
No, i can do that fine (see attached), it was getting the ball to bounce realistically off the surfaces of convex and concave curves that was the hard part. I just couldn't get my head around the mathmatics of it all.
Thanks for the help though.![]()
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts.
DOh, forgot to attach the file - and i cant edit the previous post to include it either, ah well, here it is.
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts.
damn guys....this is from 1999!I haven't used vb in over 2-3 years
![]()
LOL![]()
At least i wasn't the one to resurrect it.![]()
Quotes:
"I am getting better then you guys.." NoteMe, on his leet english skills.
"And I am going to meat her again later on tonight." NoteMe
"I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
"my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
Have I helped you? Please Rate my posts.
Darkwraith strikes again, thats two in about 2-3days you've brought threads back from the past, I think I'll have a go at it soon.
The other one![]()
When your thread has been resolved please edit the original post in the thread ()
and amend "-[RESOLVED]-" to the end of the title and change the icon to, Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.
![]()
But now we have a thread on collision regions.![]()
"Can't" and "shouldn't" are two totally separate things.
All questions should be answered. All answers should be true. That is why I post.