megatronx's Recent Forum Activity

  • I'm still working with C2 and AOZ Studio from recently.

  • BruxaBranca Yes, it is a nice plugin, but unfortunately shadows are broken and disappear depending on camera angle. Would be nice if it would get fixed.

  • R0J0hound Hi, do you think you could fix that disappearing shadow issue?

  • megatronix

    I’m still running off memory here.

    I’m pretty sure the layers take either a number or a base16 string(hex). Or just hex in the properties toolbar. I forget if it let you use base2 strings which would be 32 ones or zeros in a string.

    Anyways I’d say try using a number with setbit() with your events to set the layers. Something like:

    Var layers=0

    Repeat 32 times

    Some condition

    — set layers to setbit(layers, loopindex)

    Anyways that’s my the idea at least.

    Thanks. Will check it out.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I often forget about how things work in the stuff I make. I’m just decent at figuring it out should I have time and access to a computer to try stuff out. But I haven’t been on a computer for weeks now.

    Anyways I don’t recall what values the the layers parameters take. Is it a number? A hexadecimal string? A binary string? I’d have to check, either by trial and error or looking at the tooltip text that shows up when selecting that field.

    I’m guessing If it’s working for only 8 then it’s in hexadecimal since 8 hexadecimal characters is 32 bits.

    I guess you could build the string up as binary first and convert it over to hex. Or maybe the action lets you supply a number instead of text you could use a number you set with the setbit() expression. I honestly don’t recall though. This is all off the top of my head.

    The way you explained it to me back then wasn't perfectly clear to me. You said 32 would be hex for clarity. But to me hex is an alien planet. You did add that I can use binary. I tried that and entered all 32 layers in binary manually and it worked. But when I do a loop to fill up variable and then put it in to the collisionLayers it only works with 8 numbers and not more. And that's quite weird, that's why I'm assuming it might be a bug, or I'm doing it wrong.

    If there would be a chance to figure it out, it would be cool. For time being, I've digged out your old smooth collisions with image points example and used that and works well on my little test. On top of that, since im working in 3d, I check ELSE if the actor is in between Z and Z+depth of object if actor isn't above it, so I'm assuming this will actually perform well with walls collisions as well as between actors.

    https://drive.google.com/file/d/1EbzmEPYIFnwwhYxfRTp3qZOA6weT5waR/view?usp=sharing

    You are absolutely amazing with it, and I'm not. I'm better then I used to be, and created planty of prototypes throughout the years, but I feel my limitations quickly. I'm more of a creative type. But with everything you have put out till now, it does makes things so much easier. So thanks a lot.

  • At a glance I’m not super sure what I’m looking at. What’s not working?

    I’m guessing you’re intension is to have the scene divided into 32 z slices and set the layers depending on which ones the object is in?

    In which case I’d say look at your formula and see if it’s doing what you think it should be doing. If it isn’t then I’d say try re-thinking the approach. Best case you just made a typo somewhere.

    Thanks for reply.

    This is to give 32 collision layers to object from family physics, and it checks from 0 to 32. it gives 1 when is in between the bottom of the object (physics.z) and top of the object (physics.z+physics.depth) and GridVert is just variable for vertical grid. Otherwise it adds 0 to the text variable. Then it puts variable in to object variable and the collision layers. There aren't any typos. It just doesn't work. When I display collision layers via text to view, it gives me some weird float number. When I look in to object variables, the variable displays the layers correctly. When I put them in manually in to the plugin however, 32 layers are working. What do you think might be the issue? I remember long time ago that I couldn't get it to work. But almost the same events were used for only 8 layers and it was working, and when I say "alsmost" I mean that they were couple more events that when I looked at them recently I've realized they could be done easier. But those event also didn't accept 32 layers, only 8 I'm thinking maybe I'm missing something, using text var instead of another, or maybe a math function? OR maybe, maybe there's a bug? Or But I don't think I'll figure it out, since I've spent a lot on it already, and I'm out of ideas. Please help pal. It's your plugin and you know how it is working. Thanks.

  • R0J0hound

    Replying in Chipmunks topic is not available any more so I'm posting here.

    Hello. Last time I got it working with 32 binaries, but with an automated option things aren't working. Here's how I'm setting up col layers. Any idea what I might be doing wrong?

    Thanks!

  • FunkY Koval

    Hey, that's an option too. I already solved this problem in another way with only few events. And works 100%.

    However, another option I've tried earlier, and it work pretty well, but only for object that are x,y symmetrical, was to calculate if actor overlapping platform; platform pick highest; set actor.z to platform.z-distance(actor.x,actor,y,platform.x,platform.y)/segmentDepth)* I guess I'd had modify this condition to work for asymmetrical objects using your solution.

    SegmentDepth is the height of the segment of the platform. For example in my projects case it was something like platform.depth/5. However, since my mesh isn't vertically symmetrical, I would have to adjust this number manually across each height, so I ended up working out something else that works now at every height and also has correct Z picking ( and done it last night and was super happy and moving on with the project).

    *PS.And wouldn't it be nice if construct would have such simple scripting feature too? platform pick highest; etc. that would be super fast to program)

  • R0J0hound

    No worries - I'm glad you're still on it.

    megatronx

    Not to sound like a buzzkill, but I don't think you should post pieces of Q3D publicly - it is a commercial plugin.

    In lieu of proper raycasting, since you mention it's for terrain snapping, you could cache height data into an array and do positional interpolation. For anything more 3d, spherical collisions would still be doable...

    Ok. Removed. I thought it was abandon were. Anyway, how can I cache data of 3d object in to array?

  • Guess I can’t play mkv files from my phone. Anyways, will look later in the week if I get on my pc.

    I’m going to stick with the 0-1 for color values I think. You can divide values in the range 0-255 by 255 as a easy conversion.

    Depending on the shadow issue you can improve it by adjusting the shadow bias or using a bigger shadow map size. But I’ll see better when I get to watching the file.

    That's ok. I can manage with 0-1. Shadow map size doesn't fix it much. But I actually incorporated partially this shadow issue in to game art :) Although it would be nice if shadows were smooth. However I'm starting to see need for ray casting to set object's Z on top of terrain. Very important.

    And maybe this will help playfuljs.com/a-first-person-engine-in-265-lines

    And if not raycasting, then maybe some other poly collision trigger. Also, helper boxes that show the size of the 3d object at runtime, so I know if the object match the size of model. Super important to do.

    If you could help me with this now, that would be great. Thank you so much.

  • One more video presenting the shadow issue

    https://we.tl/t-ogyQthdy9y

megatronx's avatar

megatronx

Member since 25 Sep, 2008

Twitter
megatronx has 1 followers

Connect with megatronx

Trophy Case

  • 16-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • 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

23/44
How to earn trophies