help with sphere and a rotating a flat

Blitz3D Forums/Blitz3D Programming/help with sphere and a rotating a flat

Manromen(Posted 2004) [#1]
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.




big10p(Posted 2004) [#2]
I may be misunderstanding what you want but can't you just parent the sphere to the 'flat'?


Manromen(Posted 2004) [#3]
parent would rotate the ball, not move.
I need that the ball don't fall off if i rotate the flat.


Duckstab[o](Posted 2004) [#4]
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


Manromen(Posted 2004) [#5]
ok i will try this


DJWoodgate(Posted 2004) [#6]
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. :)


Manromen(Posted 2004) [#7]
Cool thank you very much =)