christina's Recent Forum Activity

  • R0J0hound

    Um. I've lost track of the math again, but your prototype only worked for a specific ratio.

    I tried to change that ratio to something more useful. So, if the world width and the perspective rectangle bottom width are equal, the ratio comes out as 2.425

    Did you use actual pixel dimensions when you made the assumption that Z=2 ?? Is that where this number comes from?

    Anyhow, it works well for now and until I can go back and re-check your genius math. <3

    https://dl.dropboxusercontent.com/u/280 ... ction.capx

  • R0J0hound , R0j0 assuming the z of the back edge is "2" seems to have a strange effect: these pairs of rectangles now only work if they are the same relative size.

    If I resize the perspective rectangle without resizing the top-down rectangle, the equations don't work at all.

    If the top-down rect is 400x400, the perspective rect has to be 970x330. I don't know what this ratio means. Do you?

    I don't mind working with this limitation, I just thought I'd make a note of it. Thanks again <3

    https://dl.dropboxusercontent.com/u/28087823/Construct%20Examples/marioPinball/3DmappingR0j0.capx

  • R0J0hound you can't resist a math challenge can you?

    <3

    Thanks for all the help, it's the first time I understand *all* of your math.

    You're incredible.

    Oh and here's a wip of the game you've helped

  • R0J0hound Just a quick untested thought, maybe we can get the FOV into account by using a "scaling" var, like this:

    scaling = (x_resolution/2) / tan(fov_angle/2).

    Then we use

    y = (y_world * scaling) / z

  • R0J0hound I just logged in to tell you you're absolutely right about the Y axis, that's totally the way to go! And I fixed the X axis calculation like you did.

    And thank you *so* much for taking the time to make a capx <3

    I owe you lots, and we all do.

  • Thank you everyone. newt this seems to be over my head too :/

    R0J0hound always a step ahead.

    This actually produces very weird results:

    https://dl.dropboxusercontent.com/u/280 ... ping2.capx

    There is some 3D projection going on, (drag and drop the ball to see), but it's not right at all.

    So your calculation of Z gives

    Z= w2/w1 when V=0 and Z= w2/w2 when V=1

    So Z is from 1 (nearest) to about 1.7 in this case. Why? What does this number represent?

    Follow up questions:

    1.Why do you calculate Z like that?

    2. Why are we dividing (u-0.5) /z ?

    Thank you for taking the time everyone. Please let me know if I can pixel something for you in return <3

  • rho thank you for the rapid response!

    Unfortunately I haven't been able to understand vector math too well, and the wikipedia article is way above my league. I just intuitively know I should factor in Z somewhere in my calculations of the Y' coordinate of the ball on the 3D table.

    Maybe I'm not smart enough for this

  • I have mapped the red ball of the bottom top-view 2D table onto the top pseudo-3D table using essentially linear interpolation of the points. The red ball's X position on the 3D table is accurate. The *y* coordinate however is very wrong. See the ball on the 3D table isn't nowhere near the pharaoh's feet.

    From what I gather, I need to take Z into account somehow, but I don't know how.

    If anyone ( R0J0hound ?) has any ideas? I don't need texture mapping, just coordinate mapping.

    Thank you

    Here is my .capx

    https://dl.dropboxusercontent.com/u/280 ... pping.capx

  • Ashley and everyone. Seems keyup isn't possible at the moment, and it's a little buggy, but key down is correctly recognized.

    Here's a plugin by oopwngoo.

  • Great work then, considering the limitation <3

  • You're incredible, thank you oopwngoo )

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • This is amazingly awesome oopwngoo!

    Thank you very very much.

    Two things:

    1. Is there no way to see if a left/right key is released?

    It has to be useful as an on/off trigger for left/right pinball flippers.

    2. It appears that it only works for one keypress. It prioritizes left shift. If left shift is being pressed, right shift doesn't register until left shift is released.

    Also, I've made this icon for my own use.

    http://puu.sh/czrsY/2f93aead62.ico

    You may or may not want to include it in your plugin.

    Again, thank you so much <3

christina's avatar

christina

Member since 21 Aug, 2012

Twitter
christina has 3 followers

Connect with christina

Trophy Case

  • 12-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

16/44
How to earn trophies