Ashley's Recent Forum Activity

  • Yeah, that should all be working correctly. It's difficult to help without more information, such as a sample project file.

  • Construct automatically takes in to account the device pixel ratio (which I presume that setting is changing). So it should work. It's hard to say more without more information.

  • I realised the runtime can actually calculate this for you, so I've added a read-only Z scale property to 3D camera, and a new ZScale expression on 3D camera, for the next beta.

  • There's rarely any need to use base64 these days, and it's more efficient if you don't use base64. You can instead use 'Save image' in Canvas, use AJAX to fetch the image directly in to Binary Data, and then use Local Storage to save the Binary Data to storage. Then you can later load the Binary Data from storage again, load an image from the Binary Data URL, and paste that in to the canvas. This keeps everything binary and never converts to base64.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't speak Spanish but Google Translate says "capas" is "layers" in English. So I think that message is in fact telling you that the free edition layers limit is exceeded, not the events limit.

  • So when we first added Z elevation the Z axis was originally normalised such that at 100% zoom the camera is at a Z position of 100, looking down at the Z=0 plane (i.e. 100 units away). This kind of made sense for Z elevation to make it simple to use no matter the view size. However with the added 3D features I think it's actually become a bit of a complication. We might need to add a setting that lets you change this to something that uses equal units on all axes for 3D.

    To work out the math you just need to think about the camera on a side-view, and use trigonometry:

    If you split the view in half, notice the top triangle has an angle of fov / 2, and the opposite side of the triangle has length viewH / 2. Currently Construct calculates z to be 100 and scales the view to fit that, using a fixed FOV of 45 degrees. But instead you can calculate what z ought to be given the angle and opposite length. With trigonometry we know tan(a) = opposite / adjacent, which in this case is tan(fov/2) = (viewH / 2) / z. Rearranging to solve for z, we get z = (viewH / 2) / tan(fov/2). If I open the 3D shape example and use the view height there of 480, this gives z = 240 / tan(22.5) = 579.4 (approx). Since we know Construct calculated z to be 100, this gives a Z scale factor of ~5.8 to match Z units to X/Y pixels. So one of the 3D boxes is 100x100; to make it a cube its Z height should be 100 / 5.8 = 17.2 (approx).

    So if I set the cube to a Z height of 17.2 and set up a 3D camera looking at it, bingo, it looks like a cube with the same size on every axis:

    The default of 14 was just a guess from eyeballing it, but is a bit too short. Your guess of about 5:1 was close, it's 5.8 in this case, but as you can see it depends on the viewport height of the project.

    With a new camera setting to match all the axes, you'd be able to just set the 3D shape to 100x100 with a Z height of 100, and it'd look cube. Although I'd add the details of these calculations may change in future, such as if we add a configurable FOV.

  • You need to make sure at least one layer is set to use 3D mode, and you must also initialise the camera with 'Look at position', otherwise the camera is not initialised and so cannot be rendered. (For example, unless you provide an up vector, the engine doesn't know which way you want to be up.)

  • No, I meant with us. We can probably work around it if something's changed. As ever filing issues is the way to report problems, things only mentioned on the forum are easily lost or forgotten.

  • Maybe something changed in a Chrome update. If you can reliably reproduce it please file an issue.

  • You can only set a light radius when the light height is 0.

  • Can't you just put the JS code from the other thread in a script in Construct? That post is from the old C2 forum, but C3's JavaScript coding feature is ideal for snippets like that.

  • I just tried it in Chrome in the latest stable and beta and it seems to be working fine.

    Do you have any browser extensions installed? They can interfere in various ways.

Ashley's avatar

Ashley

Early Adopter

Member since 21 May, 2007

Twitter
Ashley has 1,437,451 followers

Connect with Ashley

Trophy Case

  • Jupiter Mission Supports Gordon's mission to Jupiter
  • 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
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • Forum Mega Brain Made 20,000 posts in the forums
  • x108
    Coach One of your tutorials has over 1,000 readers
  • x62
    Educator One of your tutorials has over 10,000 readers
  • x3
    Teacher One of your tutorials has over 100,000 readers
  • Sensei One of your tutorials has over 1,000,000 readers
  • 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
  • x36
    Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

32/44
How to earn trophies

Blogs