News:

*NEW* Current Version on STEAM16.793

Webchat:
Visit the chat

x_screen2world, workiiiiiiiiiiiiing!!! :D

mentalthink

Ok, for me a really usefull command, now works in the last update!!!, the log file, only tells this works on iPhone, but I test in Android and Palm Pre, and works very fine!!!.

Thanks, Gernnot for hear our prayers!!!,

Crivens

How exactly does it work? Can it, for example, place a 3D object at a set position on the screen? So for example I could have a score on the screen (that never moves) using a 3D "font" (using individual 3D objects) for example?

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Kitty Hello

yes, so.
Search the forums for the bug report. It has a proper example.

can someone copy that example to the X_WORLD2SCREEN manual (also German?), please?

mentalthink

Well, I put this code, because in Android and Palm Pre, you need a little modification, because the effect differs a little of the pc.
Code (glbasic) Select
`GETSCREENSIZE sizex,sizeyLOCAL a, sx,sy,sz, wx, wy, wz X_LOADOBJ "Media/Box001.ddd",1WHILE TRUE INC a,3 X_MAKE3D 1,10000,65 X_CAMERA 0,0,10, 0,0,0 X_SCREEN2WORLD (sizex-sizex/2)+(2050*COS(a)),sizey,0, asx, asy, sz# X_MOVEMENT asx,asy,0 X_DRAWOBJ 1,0 X_MAKE2D PRINT "*",sizex/2+(205*COS(a)),sizey/2 SHOWSCREENWEND`

Well you can see, extrange things, like multiplications and divisions, well how my maths ara very rubished, I think the explanation is this:

The measures in the 3D world, are 100 pixels are equal than one unit in 3D world, ok?¿.

Well for this you can see in the world2screen command it´s multiplied by 10 becuase the pos in Z, of the camera it´s 10 units, I dont´stay sure about this but for me works, very well.

I attach the complete code, if you test in PC, Android or Palm Pre, runs exactly equal, on iPhone I dont´t test yet, but perhaps, you don´t need to make this multiplication.