Collisions Question

Blitz3D Forums/Blitz3D Beginners Area/Collisions Question

mulawa1(Posted 2007) [#1]
I think this time I may be asking too much of BlitzBasic.

Let me reduce my problem to a very simple case.

Imagine two L shaped pieces made from 3 cubes - I want to prevent them penetrating each other BUT I want them to be able to interlock.

I have tried two approaches:

1. In BB3D I made the shapes out of cube entities held together by a parent pivot. I set up collision detection on the pivots with children enabled - works fine BUT because children can move independently, a collision can cause the cubes to lose alignment.

2. In 3DC I created the shapes by extruding a cube, exporting as a .x file and loading as a mesh into BB3D. Obviously this time I don't experience breakup BUT the collision detection seems to be only applying to the original cube (before extrusion) hence the shapes can partially penetrate.

Any thoughts that might assist me before I start trying some indirect laborious approaches?

Peter


chwaga(Posted 2007) [#2]
I don't get what you mean by "two L shaped pieces made from 3 cubes"


mulawa1(Posted 2007) [#3]



IPete2(Posted 2007) [#4]
mulawa1,

Would it be any help to move them on a grid system? Use an array to keep all cube positions and dont allow any cube to snap into a position where another cube exists.

I.e. don't use collisions as the unpredicatble way of preventing overlap, use maths.


IPete2.


mulawa1(Posted 2007) [#5]
Thanks IPete2 - that's the sort of thing I meant by "indirect laborious approaches" - as a newbie to 3D work I just wanted to make sure that I wasn't missing anything. For example, I nearly missed the "children" switch available with the collision testing stuff. As an even more extreme example, I nearly started creating my own 3D animation routines!

Thanks for taking the time to respond.

Peter