coldet wraper lib to come soon...

Blitz3D Forums/Blitz3D Programming/coldet wraper lib to come soon...

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 can snatch the matrix from Blitz using GetMatElement. That is probably the easiest way of getting it. Then you would just need to send it to your dll...

Something like this should work:
Function FetchMatrix(entity)

	matrixbank = CreateBank(16*4)

	temp = CreatePivot()
	RotateEntity temp,EntityPitch(entity,True),EntityYaw(entity,True),EntityRoll(entity,True)
	PositionEntity temp,EntityX(entity,True),EntityY(entity,True),EntityZ(entity,True)
	; And include scale if you need that too

	PokeFloat matrixbank, 0,GetMatElement(temp,0,0)
	PokeFloat matrixbank, 4,GetMatElement(temp,0,1)
	PokeFloat matrixbank, 8,GetMatElement(temp,0,2)
	PokeFloat matrixbank,12,0
	
	;....etc....
	
	; And then send the bank to your dll...
	Coldet_SetMatrix(bla,matrixbank)
	
	FreeBank matrixbank
	FreeEntity temp
	
End Function