Non reactive collision?

BlitzMax Modules Forums/MiniB3D/Non reactive collision?

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You might be able to use the pick-related commands to simulate a non-response collision. Very rough example:

SuperStrict

Import "c:\temp\minib3d\minib3d.bmx"

Graphics3D 800, 600

AmbientLight 255, 255, 255

Local Camera:TCamera = CreateCamera()
PositionEntity Camera, 5.0, 5.0, 5.0
CameraClsColor Camera, 255, 255, 255

Local Cube:TMesh = CreateCube()
PositionEntity Cube, 0.0, 0.0, 0.0
EntityColor Cube, 0, 0, 255
EntityAlpha Cube, 0.5
EntityPickMode Cube, 2
EntityRadius Cube, 1.0								

Local Pivot:TPivot = CreatePivot()
PositionEntity Pivot, 0.0, 0.0, 3.0

Local SphereRadius:Float = 1.0
Local Sphere:TMesh = CreateSphere(8, Pivot)
ScaleEntity Sphere, SphereRadius, SphereRadius, SphereRadius
PositionEntity Sphere, 0.0, 0.0, 3.0, False
EntityRadius Sphere, SphereRadius
EntityPickMode Sphere, 1										
EntityColor Sphere, 0, 255, 0

PointEntity Camera, Cube

While Not KeyHit(KEY_ESCAPE)

	Cls
	
	TurnEntity Pivot, 0.0, 0.5, 0.0
		
	Local ent:TEntity = PickCollision(Cube, 2 * SphereRadius)							
	If ent = Sphere Then EntityColor Sphere, 255, 0, 0 Else EntityColor Sphere, 0, 255, 0

	RenderWorld
	
	Flip True

Wend

End

Function PickCollision:TEntity(actor:TEntity, range:Float)

	Local ent:TEntity = EntityPick(actor, range)
				
	If Not ent Then ent = EntityPick(actor, -range)
				
	Return ent
	
EndFunction