Moving 3D objects

Previous topic - Next topic

bjimenez

Hi,

Ok, it seems moving 3D graphics is very different the a 2D graphic, so what I'm wondering is there some way of easily doing this? Say I want to have a 3D graphic follow the mouse movement on a touch screen. How would I go about doing this?

Schranz0r

Use X_SCREEN2WORLD and X_MOVEMENT :)
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

bjimenez

Thanks I know those commands, but how do I convert the mouse x and y position to the 3D x y position?

mentalthink

Hi bJimenez for make this you have 2 commands...

World2screen
and screen2world

The first from 3D to 2D and the other the inverse...

Another way for know the measures of the screen in 3D, it´s very easy:

In 2D create a line in the middle of the screen from top to down... and plave the 3D object just in th 0.0.0  3D world coorinates....

Put a counter... for right and Left, and a simple print, whit this values... it´s the same in right and left , but whit the - signus... I remenber
whit this values 1,1000,45 the values are 5 and -5, sorry perhaps this values are wrong...

bjimenez

Quote from: mentalthink on 2012-Jan-15
Hi bJimenez for make this you have 2 commands...

World2screen
and screen2world

The first from 3D to 2D and the other the inverse...

Another way for know the measures of the screen in 3D, it´s very easy:

In 2D create a line in the middle of the screen from top to down... and plave the 3D object just in th 0.0.0  3D world coorinates....

Put a counter... for right and Left, and a simple print, whit this values... it´s the same in right and left , but whit the - signus... I remenber
whit this values 1,1000,45 the values are 5 and -5, sorry perhaps this values are wrong...

Thank you, after some thought, I think I'll just stick to 2D graphcs for now.