attaching two spheres together

Posted By: PrenceOfDarkness

attaching two spheres together - 08/28/11 15:01

Hey guys, I'm making a simple game where I want to attach two spheres together (actually it's many sphere but I can't even attach two together yet). One of them will be rotating about and the other should attach to it and just simple spin with it. I can't think of a good way to go about doing this. Any suggestions?

I just realized that wasn't very specific. Let me explain what I'm trying to do exactly. I'm going to have a big grey sphere in the middle of the screen which you can control by rotating counter clockwise or clockwise. Other spheres are coming at you from all different directions. When they impact with you they should attach but not overlap with the grey sphere. I would want the point of impact to be the point of attachment.

I hope that makes a bit more sense.
Posted By: 3run

Re: attaching two spheres together - 08/28/11 15:18

You should use "cos" and "sin" with the first PAN of the first sphere which should rotate I guess.
Should I make a demo? I can give it a try if you want me to.
Posted By: PrenceOfDarkness

Re: attaching two spheres together - 08/28/11 15:43

I thought of that 3run. I thought it might be a lot of work and I was over thinking it. If there is no other solution then I guess I'll go that route. Also check out the previous post as I edited it a bit.
Posted By: 3run

Re: attaching two spheres together - 08/28/11 16:09

I have quick and small thoughts about this.. Check each moving spheres XYZ coordinates (relating to the grey sphere position).
Then, when small sphere touches the grey one, in event attach it's position, relating to grey sphere, and rotate it with it's angles.
This just quick thoughts, I'll give it a try. If I'll get anything work, I'll let you know.
© 2024 lite-C Forums