How do I do simple 3D? (the cube is done already, see demo)

0 favourites
  • 4 posts
From the Asset Store
Demo Game Multiplayer Online with member registration system
  • Hello, dear Construct2 experts!

    I've just made simple pseudo-3d example (the idea was found on a forum, thank you!).

    Here is the DEMO: http://arte-code.com/3dT/index.html

    I want to know is it possible to rotate and scale "vertical" lines of that cube with single function, regardless of line's count? I want to make a complex structure that way and don't want to make event changes manually.

    I am attaching a .capx to my question: http://arte-code.com/3dT/top3d_lines.capx

  • Well, I'll consider that silence as a proof that there are no shortcuts in the gamedev ^_^

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Sure there is, it's called math.

    The normal way to manipulate 3d points is to just change around the x, y, and z values to transform them. Then you use a perspective transform to map them to the screen.

    You can read about vectors and matrices for the nitty gritty of the math.

    To move you can just add numbers to the position to move them.

    To rotate look up 2d rotation for a formula to do it.

    Scaling is just a matter of multiplying the position by some values.

    For rotation and scaling it's always done around the center 0,0,0. To do it around some other point you need to first move everything over so the rotation point is 0 then after that move the points back be the same amount.

    Perspective in it's basic form is just dividing the x and y by the z.

    You can look around the forum for a few examples. Search for "pseudo 3d" with my username for some various examples. There's also some examples in the tutorials.

  • Thank you, R0J0hound! You're an awesome man! Almost every mathematician is an awesome man, as I think ^_^

    I found your examples and I'm looking in awe at them, they're giving me shivers actually.

    But I can't count them as shortcuts, they're full-featured math problems (as for me). Nevertheless, thank you so much for your sole existence and will to help such dark creatures like myself ^_^

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)