Sprites doubling in size for no apparent reason

Blitz3D Forums/Blitz3D Programming/Sprites doubling in size for no apparent reason

I found this problem is caused by parenting the camera to a previously scaled mesh!! Is this a bug?

The enemy meshes are loaded at startup and then scaled x3. When enemycam is selected *most* sprites automatically increase in size by the same amount. Wierd!

I've replicated the problem in the following code. Try it. It doesn't make any sense to me why sprites would increase in size by the scale of the camera's parent.

Graphics3D 640,480,16,0

;load a sprite. I tested this with a sprite 128 x 128.
sprt = LoadSprite("sprite1.jpg")
PositionEntity sprt,-8,0,10

;Creat a mesh
mesh = CreateSphere()
PositionEntity mesh,8,0,10

;create 2 meshes, side by side, to act as parents. Within a game these could be spaceships, characters,
;vehicles etc.
parentent1 = CreateCube()
parentent2 = CreateCube()
PositionEntity parentent1,5,0,-50
PositionEntity parentent2,-5,0,-50

;Scale one of the parent entities.
ScaleEntity parentent2,3,3,3

;create a camera.
camera = CreateCamera(parentent1)
PositionEntity camera,0,0,0
PointEntity camera,sprt

While Not KeyDown(1)
	;Hit the space bar to change cameras. Notice how the sprite changes in size!!
	;The mesh does not.
	If KeyHit(57)
		whichcamera% = -1-whichcamera%
		FreeEntity camera
		Select whichcamera%
			Case 0 
				CreateCamera(parentent1)
			Case -1
				CreateCamera(parentent2)
		End Select
		PositionEntity camera,0,0,0
		PointEntity camera,sprt
	End If
	RenderWorld
	Text 320,10,"Press SPACE to change cameras.",True,True
	Flip
Wend
End