Collisions With A Flipped Cube

Blitz3D Forums/Blitz3D Beginners Area/Collisions With A Flipped Cube

Nathaniel(Posted 2006) [#1]
I am creating a game where balls roll around inside a semi-clear box. You use the mouse to turn the box. But when I run the program, the balls just sit there (at 0,0,0)- until I turn the box. Then they fall and go right through the box.

I'm using this collision method:

Collisions SPHERE_TYPE,CUBE_TYPE,3,2


Also, I used the command: FlipMesh to make the box inside out.


Has anyone had collision problems with a flipped mesh?

Thanks


Sledge(Posted 2006) [#2]
It's not the fact that you flipped the mesh - you probably need to set up an entitybox (for collision type 3), but ultimately it will be the fact that you're moving the object that is supposed to be collided against which screws you. The built-in collision system doesn't cope with that sort of thing.


Nathaniel(Posted 2006) [#3]
Thanks for your answer. Okay... so is there any way of doing this? (Balls roll around inside a turning box.)


Leto(Posted 2006) [#4]
Can you rotate/turn the camera instead of the box, to make it look as though the box is turning? Then you can move the ball relative to the camera angles?


Stevie G(Posted 2006) [#5]
There's a dynamic collisionlib in the archives which may be able to handle this.

[EDIT]
Here :

http://www.blitzbasic.com/codearcs/codearcs.php?code=898

Stevie


Nathaniel(Posted 2006) [#6]
@ Leto
The only problem with that is I would have to change the way gravity is pulling on the balls inside. Good idea though!

@Stevie G
Thanks Stevie!