Sir LoLz's Recent Forum Activity

  • I have a canvas object and I want to save the image to a sprite. but it never loads on the "on snapshot" trigger

  • Heyo. I tried importing the C3 addon. but when I try to use it construct 3 can't start the preview. am I missing something?

  • That is a good system. I will consider that. though I may want some physics such as being pushed.

    I found a better method than what I was doing before though. I poll each pixel around the player every time they move a certain amount. and create dynamic solids as needed.

    On the left, the player is climbing a ramp by an edge. The pixels on the left are green because while they may be higher than the player. They are below a climb threshold I set. (player.z + climb) So the player can freely move there.

    On the right, though the player is on ground level. The elevation above is taller than the climbing threshold.

    these are calculated at the player's current height. So any jump/fall the player is doing will be factored into this dynamic solid creation.

    I am very pleased with this because it is dynamic and does not need me to do any walls beforehand. It goes off the already existing height map. I will optimize it later but it's a good proof of concept.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i tried saving the last x and y of the player hoping I could jump back to that in order to allow a new "On pre collide" to happen. but it seems to do nothing

  • Sir LoLz

    Did you find a way to calculate 3D physics? Or you just made the 3D ramps at the (0, 90, 180, 270, 360) degrees?

    What I did is add chipmunk physics because it lets me run calculations after a hit is made but before a result is applied. so over my height map I place wall objects where elevation is severe. I then calculate the player's Z VS the Z of where they are going. if the players Z is higher then it means they would be falling off. but if they are lower then they hit a wall. I need to iterate more on this function as it does not work around corners. but it's a great proof of concept so far.

    I also added a boolean to lock the player to the ground. used to keep the player touching the ground if the z change is so small you don't want the player to "float" to it. so that way you don't float down inclines"

    On that note, tho R0J0hound something is up with the physics. a player may hit a wall and it stops correctly. I use "on pre-step" to see if they should hit the wall or fall off the elevation the wall separates. it works fine but the trigger is not reset until the player steps back. Ideally, I would want the player to be able to hit a wall and be stopped. but to then be able to jump and then clear the elevation difference. any advice?

  • figured it out. I was using the "set angle" command instead of the "Set Euler" still not sure why that affected it 100% but no doubt it's related to Gimbal Lock.

    things seem to be lining up nicely now. still some work to do before everything translates correctly from 2d to 3d. but I'm happy

  • Ok got a new issue.

    for some reason when the camera is angled between 90 and 270 it flips upside down. I made sure to force the player sprites rotation between 0 and 360, and not -180 and 180.

  • I was thinking of using a height map myself so I will go with that. it's easy to do in blender. my test level only goes up to about 140 so I should be good as long as I lerp between where you are and where you are going.

    I made a shader for the object that colors it based on the height of the vertex. and with the camera set to Orthographic, I get a good height map

  • ah I changed some export options and now it has no issues.

    I don't suppose there is a way to cast a ray or otherwise check the height of a point on an object?

  • playing around with loading a 3d object I seem to have missing faces. in blender, I selected all faces by material and then exported them as individual objects (I don't think I can apply multiple textures to the same object by use of the mtl file) but for some reason, some faces disappear in the addon. It's odd because if I load the same parts in a model viewer they show up fine.

    It also seems to only affect these ramp areas.

  • got yah.

    I was able to get around it by using a sprite as a middleman, the now paster object's texture is loaded to the box object. and when that url is done loading from the "on image URL loaded" event the sprite is then loaded onto the 3d object.

    It is definitely not the optimal way to do this. But as long as I am careful to manage paintable surfaces and texture sizes it should be manageable. doing a test with surface sizes of 1920x1920 X 8 test surfaces I get about 147.48MB image usage. if later on it becomes an issue again I may take a look at modifying your plugin in some way if you are ok with that.

  • I was trying to get a splatoon like effect where you can "paint" the ground. to do this I have combined the effects of the canvas plug-in.

    for each "ground" I create a canvas (for different heights) and link the canvas to the ground. then paste a "paint" object to the canvas and then load the canvas image from url. it works well.

    however, there is a flash from the 3d object when the texture updates. is there a way around this?

    I have attached a capx based off the billboarding example.

    drive.google.com/file/d/1095dD0HsGEetacL-waQpMymezb71hCl3/view

Sir LoLz's avatar

Sir LoLz

Member since 1 Oct, 2014

Twitter
Sir LoLz has 58 followers

Trophy Case

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

Progress

17/44
How to earn trophies