|
Post by PeterMaria on Sept 4, 2008 2:29:02 GMT -5
Hi Tom,
what about rotation? It might look like this
SprSetXAngle(w#) Turns an element around the x-axis SprSetYAngle(w#) Turns an element around the y-axis SprSetZAngle(w#) Turns an element around the z-axis
Just a question !
|
|
|
Post by Nicky Peter Hollyoake on Sept 4, 2008 7:31:53 GMT -5
SprSetAngle?
|
|
|
Post by PeterMaria on Sept 4, 2008 10:26:40 GMT -5
SprSetAngle()
actually, only for x - rotation !
|
|
|
Post by Nicky Peter Hollyoake on Sept 4, 2008 18:52:47 GMT -5
Not to sure about Z angle but you can fake Y (if this is how you ment you want it).
Dim Size#
Sub SprSetYAngle(Y#) SprSetSize(SprXSize(), Cosd(Y#)*Size#) EndSub
Dim Spr = NewSprite(100) Dim i
SprSetPos(100, 100) Size# = SprYSize()
Do
i = i + 1 SprSetYAngle (i)
Loop
|
|
|
Post by Darkjester on Sept 4, 2008 19:09:13 GMT -5
Freakin sweet! ;D didn't know you could do that.
|
|
|
Post by Nicky Peter Hollyoake on Sept 4, 2008 19:25:08 GMT -5
Looks better with a texture.
Dim Size#
Sub SprSetYAngle(Y#) SprSetSize(SprXSize(), Cosd(Y#)*Size#) EndSub
Dim Spr = NewSprite(LoadTexture("Data/F117.PNG")) Dim i
SprSetPos(100, 100) Size# = SprYSize()
Do
i = i + 1 SprSetYAngle (i)
Sleep(1) Loop
|
|
|
Post by Darkjester on Sept 4, 2008 19:49:03 GMT -5
True
|
|
|
Post by PeterMaria on Sept 5, 2008 2:49:25 GMT -5
Hi N [&&] L,
That's not what I wanted ! That what you made are baubles. I meant a correct y- rotation and z- rotation! I can do unreal things myself, that is for me not difficult. For manipulations, You might use "SprSetXFlip,SprSetYFlip,SprSetScale" for example. But all of this are not real rotations!
|
|
|
Post by Nicky Peter Hollyoake on Sept 5, 2008 8:57:27 GMT -5
Well just use OpenGL it solves all problems.
|
|
|
Post by PeterMaria on Sept 5, 2008 10:08:47 GMT -5
Hi Nicky/Leona/Forever,
all sprites statements are openGL! You can still turn a rectangle with OpenGL? And that in all directions ! No intuition, wether you understand me.
|
|
|
Post by Nicky Peter Hollyoake on Sept 5, 2008 11:10:51 GMT -5
I know sprites are OpenGL, I was just thinking use that while Tom decides to add it for a Spr command or not. He should actually let OpenGL commands effect Sprite commands. Actually "GLPolygonMode" does. But I see where you going it would be useful to have commands like "SprSetRotate(Degree, X, Y, Z)".
GLPolygonMode (GL_FRONT_AND_BACK, GL_LINE) Dim Spr = NewSprite(100)
SprSetPos(100, 100)
- Nicky
|
|
|
Post by PeterMaria on Sept 5, 2008 13:24:12 GMT -5
Correct ! I like the name!
SprSetYRotate(angle) SprSetZRotate(angle)
|
|
|
Post by Tom Mulgrew on Sept 6, 2008 5:09:46 GMT -5
I'm still a bit confused about what SprSetYAngle(angle) would do... I'm pretty sure it would have exactly the same effect as SprSetWidth(cosd(angle)*width), given that sprites are drawn using an orthographic projection (rather than a 3D perspective projection).
|
|
|
Post by PeterMaria on Sept 6, 2008 7:37:43 GMT -5
Ahhh,
i give up.
|
|
|
Post by Nicky Peter Hollyoake on Sept 6, 2008 13:56:59 GMT -5
To be honest I wouldn't see how it would go myself. But! maybe show an example of this. Maybe try and fake it so atleast we have the jist of it.
|
|