Has anyone figured out a way to go up a 3D wedge shape, instead of through it yet?

0 favourites
  • 12 posts
From the Asset Store
3D Car Pack 1
$2.99 USD
3D models + Rendered Low-Poly Cars in isometric, top-down, and side angles.
  • C3/Mobile game

    Anyone figured out a simple way to go up and down a 3D wedge yet?

    I have a feeling it may be possible using mesh and a tilemap and possible a behavior, but I haven't yet wrap my head around mesh completely so I'm not getting anywhere.

    Thoughts? Or better yet, Demos?

    Thanks.

  • Most of the examples use a heightmap.

    Easy to setup with a tilemap.

  • newt,

    Thank you for your response. I searched "heightmap" in the demos and didn't see anything. Do you have one that you suggest?

    Thanks

  • You're in luck, I just recently tinkered around with this.

    wackytoaster.at/parachute/3dPlatformerSlopes.c3p

    The code currently only works for one direction, but should be able to be adapted to work for all directions.

    It boils down to setting the players Z value to

    clamp(abs(slopes.BBoxLeft - player.BBoxRight), 0, slopes.Width) * slopes.ZHeight/slopes.Width

    while overlapping, and you'll need to block off access from the sides of the wedge.

    It's just that this only works for a wedge going up towards the right. For the left you need to switch the bboxleft/right and for up and down bboxtop/bottom. Not sure about wedges with other rotations but you probably have to use some distance expression for that.

  • Perhaps in the discord uploads section.

    The method is make a tilemap with different tiles to represent different heights, usually grayscale. Then check the tile type xy to the objects xy, and set the object z elevation by the tile type.

    Its not linear, but you can lerp it.

  • Reject heightmap, embrace pythagoras. :)

  • WackyToaster That is Brilliant!

    Quick somewhat related question: How do I get that green arrow to connect from the circle sprite to the block sprite?

    I've seen that before in different demos, but for the life of me, I can't figure out how that's done. I'm positive it's going to be something embarrassingly simple, but I can't figure it out.

    THANK YOU SOOOO MUCH!!

  • It's the scene graph/hierarchy feature, for which I conveniently fail to find anything about in the documentation. You can just type "scene graph" in the example browser tho. Short story: Pick two objects, right-click the parent, Hierarchy > add selection to this instance.

  • WackyToaster

    Yup, that was simple - I should have asked sooner lol

    Hey, I can probably get it to go right and left up/down walls, but if you ever get it to go forward and back up/down walls ..... can you please send it to me so I can put it on my website .... if you don't mind .... I'll give you full credit of course and link to wherever you like. (howtoconstructdemos . com) This demo is something people NEED!!

    Thank you soooo much.

  • Super helpful share, WackyToaster. Thank you :)

    I'm not working on anything 3D as of yet, but I love seeing different examples of it being put to use in Construct 3. While I normally just dive in and learn through trial & error, and use of Documentation. It is always helpful learning from examples such as this one as well.

  • Here's an updated version that also handles the side of the slopes correctly (with a little hacking) and the 4 cardinal directions. Not certain how one could handle slopes of any rotation exactly. Too much math for my brain, but probably possible somehow.

    wackytoaster.at/parachute/3DPlatformerSlopesV2.c3p

    I think the only real issue left is the fact that you can't put a slope on a 3D platform, but that's just because it's handled a bit janky right now as it can process either the platform or the slope, and simply prioritizes the platform and ignores the slope (because of the else)

    dazedangelsSure, feel free to put it up. I guess you can link to my website.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • WackyToaster - That's Amazing!

    I will get it up this week.

    Thank you so much.

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