help with sphere and a rotating a flat
Blitz3D Forums/Blitz3D Programming/help with sphere and a rotating a flat
| ||
Hello i got a problem with my programm and maybe anyone want to help me =) I got a flat and a sphere on it. I want to rotate the flat, if the sphere is on the flat, the sphere have to move up or down. I don't know what i am doing wrong with the calculating the way the sphere have to move to be on the flat. |
| ||
I may be misunderstanding what you want but can't you just parent the sphere to the 'flat'? |
| ||
parent would rotate the ball, not move. I need that the ball don't fall off if i rotate the flat. |
| ||
looks like a collision problem you check that the ball is touching the flat but when the flat moves it goes into the ball because there is no collision check you could check if flat hit ball if true move the ball up or down to allow space for the flat to move then continue as normal |
| ||
ok i will try this |
| ||
This just takes advantage of sliding collisions to move the ball, so nothing fancy (other than Marks collision code). As big10p says the ball is parented and moves with and relative to the 'flat'. Any erroneous ball collisions are discarded immediately after movement of the 'flat' (they will be bad because the ball is always in a contact situation with the mesh and the collision system does not deal with sphere to poly collisions if the poly object is moving - penetration will occur). The ball is then translated down true to the world and will slide along the rotated 'flat'. Thanks are due to S. Swift for the nifty ball rotation. Edit. I have now finished messing with it for the time being. :) |
| ||
Cool thank you very much =) |