Method OnObjectRender:Int(obj:ftObject)
If KeyDown(KEY_C)
If obj.GetColType() = ftEngine.ctCircle
DrawCircle(obj.GetPosX(), obj.GetPosY(), obj.GetRadius())
Else
DrawLine(obj.GetPosX()+obj.x1c, obj.GetPosY()+obj.y1c, obj.GetPosX()+obj.x2c, obj.GetPosY()+obj.y2c)
DrawLine(obj.GetPosX()+obj.x2c, obj.GetPosY()+obj.y2c, obj.GetPosX()+obj.x3c, obj.GetPosY()+obj.y3c)
DrawLine(obj.GetPosX()+obj.x3c, obj.GetPosY()+obj.y3c, obj.GetPosX()+obj.x4c, obj.GetPosY()+obj.y4c)
DrawLine(obj.GetPosX()+obj.x4c, obj.GetPosY()+obj.y4c, obj.GetPosX()+obj.x1c, obj.GetPosY()+obj.y1c)
Endif
Endif
Return 0
End
When you press now the C key, every object that has the render event activated, will draw an extra circle or box to show their collision bodies.
raquette.SetColType(ftEngine.ctBox)
raquette.ActivateRenderEvent(True)
For the ball, just add this line tot he CreateBall method:
ball.ActivateRenderEvent(True)
The information about the collision you print is the Y-Coordinate of the ball, the center of the ball. Not the Center of the collision.
So, if that is still not what you want, then please try to explain again, where the problem is for you.