Physics problem

Blitz3D Forums/Blitz3D Beginners Area/Physics problem

GitTech -Sorry, I should have mentioned I didn't post all of the code. I have a couple of functions set up including the CreateMass function which does pretty much what is written in your post:


Function CreateMass.Mass(msh,x,y,z,mass)

	m.mass = New mass
	
	ScaleEntity msh,100,100,100
	
	m\msh = CopyEntity(msh)
	PositionEntity m\msh,x,y,z
	EntityType m\msh,1
	EntityRadius m\msh,100
	
	m\x = x
	m\y = y
	m\z = z

	m\mass = mass
Return m
End Function




My problem is not with the object creation...that works fine. What I need to do is find the type object (m) containing the second mesh involved in the collision(colEnt). Any thoughts on this, or am I doing things completely the wrong way round?

WolRon - The new code should answer your question. The CreateMass() function copies oMesh, so it's no longer needed, hence using FreeEntity.

Thanks for your patience guys, I should have posted this to begin with