collision problem

BlitzMax Forums/MiniB3D Module/collision problem

Berbank(Posted 2008) [#1]
Hi,

I've been working on a game and I tested the collision system at the beginning. After doing an update of mini3D, it seems to have stopped working. I've made a simple program to test collision and it I can't get it to work. Can anyone have a look, test this and see if the spheres collide? And if not, why not.

Thanks.

Import sidesign.minib3d


Graphics3D 800,400

Collisions 1,1,1

Global a = CreateSphere()
EntityRadius a, 1.1
EntityType a,1
PositionEntity a,-2,0,0
UpdateWorld

Global b = CreateSphere()
EntityRadius b,1.1
EntityType b,1
PositionEntity b,2,0,0
UpdateWorld

Global c = CreateCamera()
PositionEntity c,0,0,-5



While KeyDown(KEY_ESCAPE) = False

	Cls

	'PointEntity c,a
	MoveEntity a,0.01,0,0
	
	UpdateWorld
	RenderWorld
	
	Flip


Wend
Moderator Note: Please use the [code ] / [codebox ] tags when posting code. See What are the forum codes? for more information.


simonh(Posted 2008) [#2]
It probably because the source and destination types are the same. If you change the destination type to 2 it should work.


Berbank(Posted 2008) [#3]
I tried that, it didn't work. Any other ideas? It looks like it should work doesn't it? It used to work until I updated. I rolled back to 45 and it still doesn't work. Curiously the sliding collision example provided with mini3d does work.


simonh(Posted 2008) [#4]
Ah, actually, the current version of MiniB3D doesn't support 'responses' (sliding/stop) with sphere-sphere collisions - it just detects them.


Berbank(Posted 2008) [#5]
ah!
that would explain it. Would that be using EntityCollided? Everything exactly the same except no automated response?
Yes, that seems to be the case (just checked.)
Thanks Si


simonh(Posted 2008) [#6]
I should probably mention that the next version uses Blitz3D's source code for the entire collision system, so I wouldn't spend a lot of time on workarounds.


Ross C(Posted 2008) [#7]
Will it allow moving collisions? I mean both entities moving and colliding?


simonh(Posted 2008) [#8]
It's the same as B3D.


Berbank(Posted 2008) [#9]
Any chance you can keep in a callback that has no response for things like phantom volumes? Also, any idea when this will be ready?

Thanks,

B