R0J0hound's Forum Posts

  • Links updated.

  • The capx's title "point in poly" are the keywords to find the stackoverflow page. But anyway I fixed the link.

  • You probably want to create the directory first, then the sub directory.

  • Sorry, I updated it after your post and neglected to reply.

  • I think I understand. Making the camera face the object head on should solve that, or maybe something else could be done with the matrices. At any rate the code i used would need to be tweaked.

    The javascript call:

    "updateTexture(0);"

    is what affects the sprite with uid 0. You can change the 0 to any other uid.

  • It is rotating the object though. The camera angle could be changed to look straight on if that's what you mean?

  • I don't have any immediate plans to make a plugin out of this as it would become a lot less flexible to work with.

    Currently it's probably pretty far from a final design.

  • A plugin would probably be the last step because that locks in a interface design and is more time consuming to develop from a few extra steps required.

    The code is mostly just raw webgl so it's pretty low level. Which means I'd have to build some way to have animation support. Probably means I'd have to make a loader for some file format with animation information.

  • I'll just cross post this for now:

    The approach is to render 3d with webgl to some other canvas and then copy it over to overwrite an object's existing texture. That's the cleanest way I've found so far to make it inline with other sprites.

  • I did a breakdown of the units of the physics behavior here:

    Basically the units that the physics library that C2 uses is based on SI units. This is the ratio of pixels to meters:

    50 pixels : 1 m

    But when you set the gravity that's in m/s^2 so you can just set it to 9.8.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi,

    It's still on my dropbox but all my links are broken because of a dropbox change. Anyways I updated the link.

  • Here's an updated capx with obj file loading.

    https://www.dropbox.com/s/dbehcd1aestt0 ... .capx?dl=0

    The obj files need to have triangulated faces, and uvs and normals in them as well. The texture files also should be flipped vertically.

    Edit:

    Another slight update: it can update the textures of tiledbg and particles as well as sprites now.

  • It's another simple library to help make webgl less verbose. Threejs or babylon3d are kind of bulky since we won't use most of it. For minimum size just webgl could be used.

  • Yeah, that's what I mean by an obj file parser. The idea would be to include an .obj file in the project and have it read all the vertices and faces from that. Anyways, that may be a while before I do something like that. I'm mostly done for the day.

  • The specific code that creates the cube is in the mycode.js file in the project files folder.

    var arrays = {
          position: [1, 1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, 1, -1, -1, -1, -1, 1, -1, -1, 1, -1, 1, -1, -1, 1, 1, 1, 1, -1, 1, 1, -1, -1, 1, 1, -1, 1, -1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, -1],
          normal:   [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1],
          texcoord: [1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1],
          indices:  [0, 1, 2, 0, 2, 3, 4, 5, 6, 4, 6, 7, 8, 9, 10, 8, 10, 11, 12, 13, 14, 12, 14, 15, 16, 17, 18, 16, 18, 19, 20, 21, 22, 20, 22, 23],
        };[/code:3q5ffq96]
    A parser for something like the obj file format would be more manageable.