MegaMente Br's Recent Forum Activity

  • I understood how the Paster Plugin works!!!

    :DDDD

    But I found a problem, the Paster plugin don't work to copy the text plugin 'sprite', since it's not a... sprite. Anyway, it does work with SpriteFont, BUT! It does have a clip frustum or something (srry I don't want to use translate) -- It disappear when outside layout

    Anyway I searched for one plugin I saw one time, and found this: (https://www.construct.net/en/forum/construct-2/addons-29/behavior-sprite-effects-amp-46890)

    R0J0hound you were here way before me, did you by any change have already downloaded this plugin? Because it isn't available anymore. If not, I might ask the guy who created the plugin and test if it works.

    Afte all, if nothing works, I still can try making loading screen that would hide the Paster Plugin behind a sprite and the SpriteFont behing the Paster plugin to load every text inside the scene.

  • Nope, Nope, NOPE! I am giving up! I will go and try again with the paster plugin... I just asked Phinder AI to help tell me what Camera Orientation (ThetaXYZ) is and how to get it... The response:

    Here is how you can convert the rotation matrix to Euler angles:

    1. ThetaX (Rotation around X-axis): This can be calculated from the elements of the rotation matrix. Specifically, ThetaX is the arctangent of -orientYZ / sqrt(orientYY^2 + orientZZ^2).

    2. ThetaY (Rotation around Y-axis): This can be calculated similarly. ThetaY is the arctangent of (orientXZ / cos(ThetaX)) / sqrt((orientXX^2 + orientXZ^2) / >(cos(ThetaX)^2)).

    3. ThetaZ (Rotation around Z-axis): This is calculated as the arctangent of (orientXY / cos(ThetaX)) / sqrt((orientXX^2 + orientXY^2) / (cos(ThetaX)^2)).

    Also in the end it will be only a shot in the dark.

    Last Edit: I think I am starting to understand how the Paster Plugin works, the Tunel might have a light!

  • Why not have it simpler and have a speech bubble icon above object and when you approach it you'll get 2d speech bubble with text?

    Well, it's a good option and I think I might use this way. Although my objective it to create a '3D Game Template' and the way I am trying could maybe save a lot of time... or maybe just be a real shot in the dark...

    + With this I could also save a lot of memory since I won't need to save all the ballons sprites if I have a complex scene or if want to add a text typing effect.

  • I think I might use local variables then. I didn't want use them before because I thought it would make the debug window be messy.

    I will mess around with everything you told me and see what the result will be.

    ++ Try again with the Paster plugin with a can learn how to use it correctly.

    Do I have to position it behind the text

    Then I make its length the same of the text.

    Then I also I change the resolution to fit it's size

    Then? I use 'paste object'?

    This object must be a third object like a plane and that plane will 'screenshot' the area? Or the object selected must be the text?

  • Srry, What is scrollx?

    Plus, you talked about wikipedia and I search and found this:

    (I forgot it was translated, but here the link: https://en.wikipedia.org/wiki/3D_projection)

    ... let's see what I can get... (I should had listened to math class lol)

    ** I didn't understand how to get the E value {E xyz}? It's the depth? It's the FOV? How?

  • If I'd be doing a text bubble, I guess I'd work with billboards and would look for a way to turn text in to a texture. Would have to load in additional bubble graphics. Any thought how to do it with PASETER R0J0hound ?

    As for field of view, would love to make a 3d camera cone for tests, but if I won't I'll work with what c2 offers, so fov plugin. I think it's much better to work with what there is in c2 already and with additional events extend those plugins to work in 3d then inventing all of the systems from scratch if it isn't necessarry.

    I tried doing something with paster, but it looks like I have to always take a screenshot for it to work? I still stand trying to understand the Paster plugin.

  • Forget what I just said, my code doesn't work at all, I forgot to move my camera lol, when I move it breaks the code...

  • This is for "3D Text", like when you pass nearby a NPC and have a ballon for dialog, or to display enemy health bar or as I said '3D texting'! :)

    Thanks R0J0!

    I will test it right now!

    This will be edited:

    Status: Final result: it doesn't BUT! You gave an idea and I think I might now can move on!

    Plus: I think I almost found a 'formula' by testing some other formulas and combining them and testing, etc.

    * Dictionary: DedicatedTo3DConversion

    * Add keys:

    ** DedicatedTo3DConversion.Get("Dist") = distance(x, y, camx, camy)

    ** Camera2D.Angle == Rojo Z rotation

    ** PlayerAngleY.Angle == Rojo Y rotation

    ** DedicatedTo3DConversion.Get("LayerWidth") = viewportRight(Layer)-viewportLeft(Layer)

    ** DedicatedTo3DConversion.Get("LayerHeihgt") = viewportBottom(Layer)-viewportTop(Layer)

    X2d: (DedicatedTo3DConversion.Get("Dist") * cos(Camera2D.Angle) * DedicatedTo3DConversion.Get("LayerWidth")*2) /(DedicatedTo3DConversion.Get("Dist") * cos(Camera2D.Angle) +DedicatedTo3DConversion.Get("LayerWidth"))

    Y2d: (DedicatedTo3DConversion.Get("Z") - DedicatedTo3DConversion.Get("CamZ")* sin(-PlayerAngleY.Angle) *DedicatedTo3DConversion.Get("LayerHeight")) /DedicatedTo3DConversion.Get("Dist") * cos(-Camera2D.Angle) + DedicatedTo3DConversion.Get("LayerHeight")/2

    *The last time I tested it was almost working just have to do some changes for when the object isn't at the players angle of view, but this is for later.

  • I am also using something to similar to what you did. Although I am not talking about player rotation/orientation. I am trying to figure out what those guys who developed 3D things were thinking (laughs even more like the Joker)... I am becoming crazzy ;(

    What I am trying to do is the function in most engines called as "WorldToScreenCoordinates(layer, posx, posy, posz)" and Construct 3 also have that, right now I just tried reading the code they have (Opening the 3d example project 'high-tech vision' and pression 'F12' to open Google Chrome DevTools and searched at 'Sources') and it was a bit complicated to find where it was since it was... well a big code :P ...

    Anyway, I found it, but I still don't get some parts and for the second one I guess I have answer...

    First! How do I get the value of 'viewportMatrix'

    Second! How do I get the value of 'projectionMatrix'?

    Is the First the values of (orientXX, orientXY, orie...)?

    The second one I think it is named as 'projMat' inside R0J0hound runtime.js code, I just have to figure out how to program javascript and add it inside Construct 2 as an expression.

  • R0J0hound megatronx

    Can any of you help me please?

    I am trying to convert 3D pos into 2D pos, but I had no success...

    {I forgot to completely translate the comment from portuguese to english, but

    the function call is:

    Function.Call("Convert3Dto2D", <layername>, x, y, z, camx, camy, camz)

    and ignore the extra things that are written there, it was for testing and it failed}

    *There is some events that were cut off... But it is basically:

    Rojo3D.orientXX("camera")+DedicatedTo3DConversion.Get("X") +

    Rojo3D.orientXY("camera")+DedicatedTo3DConversion.Get("Y") +

    Rojo3D.orientXZ("camera")+DedicatedTo3DConversion.Get("Z")

    ...... (and similar to the rest)

    * The yellow box is the image that I am trying to set the 2D pos from the 3D pos conversion.

    * The 3D pos is from that mesh that looks a lot like a Minecraft piston block.

    But the conversion isn't accurate and sometimes when I rotate the camera It gets off the object.

    Also, if I go foward the object it stills visible at screen

    Also+ , If I turn around from that position from last image I won't see it anyway and inside the debugg console will show it's position will be really away.

    *I think with these I could achieve the '3D text'

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • add n*( tSpace.At(1,1,0) = tSpace.At(x2+1,y2+1,0) )

    Sorry to be nosy, but are you trying to compare with a info inside the array is equal to another with a fórmula...

    And if it's: true - add the x value to array

    False: add value 0 to array

    ?

    It seems correct to me. Maybe you could try using the expression:

    {I put between parentheses to be easier to just copy and paste}

    * Remove que Comments I made...

    // Start Here (

    find(

    tSpace.At(1,1,0),

    tSpace.At(x2+1,y2+1,0)

    )

    <> //Not equal

    -1

    ) // End Here

    I think this expression might work.

  • I would also like to help, I am not good at coding, but maybe I could help with UI textures and everything related.

MegaMente Br's avatar

MegaMente Br

Member since 4 Nov, 2020

Twitter
MegaMente Br has 2 followers

Trophy Case

  • 4-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

10/44
How to earn trophies