FastImage - parenting issue ...

Blitz3D Forums/Blitz3D Programming/FastImage - parenting issue ...

necky(Posted 2013) [#1]
Hi
I'm using the ever so cool Fast Extend libaries but I've come across an issue that I'd like some help with.

What I want to do is parent one image to another, or parent an image to a camera so that they inherit the parents position, scale and rotation.

In this code example below I want the image to spin on it's own axis (which it is doing right now), but then I also want it to rotate around the crosshair on the screen at the same time.

Here's my very simple test code example:

all the best!

Mike


;******************
;* Parenting test *
;******************

Include "include\FastImage.bb"

Graphics3D 800, 600, 0, 2
InitDraw	

texture = LoadTexture ("media\devil.png", 1+2 )	
Image = CreateImageEx (texture, 256, 256)

Global x,y

x = 200
y = 200

;********
;* MAIN *
;********

While KeyDown(1)=0

Cls

Color 255,255,255
Rect x-10,y,20,1
Rect x,y-10,1,20

	StartDraw

		If g#>360 Then g#=0

		SetOrigin 128, 128	
		SetRotation g#
		
		DrawImageEx Image,400,400

		g#=g#+1

	EndDraw

Flip

Wend