Map child collisions

Blitz3D Forums/Blitz3D Beginners Area/Map child collisions

Sph!nx(Posted 2009) [#1]
Hello, me again!

A little background of the thing I'm working on:

The engine I'm working on is going pretty well. I've got a menu, developers console and I'm working on a load and run code for the maps. I'm building the code so that all maps can be loaded with the same code.

The engine is written for a future project that's still in concept, so it has no real art and the player character is presented as a ball, for simplicity.

The worlds, or maps, are build with 3D World Studio.

The loading of the objects, or entities, are done through a loop that finds all the map mesh children, or limbs, by their name. This works for the meshes with a name (solid class entities) and for the placed entities (point class entities).

I've got B3D native collisions setup properly and everything works fine.

Now here lies my problem when making interactive water or invisible trigger 'brushes' as well.

Take water for example:



As you can see the water is a child mesh of the map itself. It has its own name and is found through the 'find entity loop' code.

I want it so, that when you roll in, you pass through , but the gravity changes upwards or something, so the ball floats on the water.

I can make this effect work, but ONLY if the water gets fully included with the maps collision, thus making it solid and does not let the ball pass the surface but roll over it.

I basically would like to know how to let collision be detected but not applied, so I can let other events happen, to the map mesh children.

Any help?


Thanks!!


big10p(Posted 2009) [#2]
I wouldn't use the built-in collisions for the water, at least. Instead, make the water mesh pickable and do a LinePick straight down through the centre of the ball (how far above the ball you start the pick will depend on how deep your water is). Then if the water mesh is picked, make your ball act accordingly.


Sph!nx(Posted 2009) [#3]
LinePick... I will read up on that!

Thanks!


Nate the Great(Posted 2009) [#4]
or if you just want a trigger, use collisions response 0

I havent used blitz collisions in a while so im not really sure.

edit: nevermind it doesnt work.


Sph!nx(Posted 2009) [#5]
Hmm, I find the LinePick quite confusing cause the explanations in the docs are quite limited.

I tried collision response to 0 .... doesn't work. Thanks anyway!

I can always post my source code if one is willing to dive in it a little more!


big10p(Posted 2009) [#6]
LinePick is fairly simple. You define a line (vector) in 3D space: x,y,z is the starting point of the line, dx,dy,dz is the distance (delta) from that starting point to the end of the line. If the line hits a pickable entity, the LinePick command returns that entity.

The optional radius of LinePick simply lets you specify the 'thickness' of the line. Actually, when specifying a radius, the end of the linepick is actually rounded like a sphere, so may be perfect for your needs.