R0J0hound's Recent Forum Activity

  • dropbox.com/scl/fi/6w8o0vdzkalhxl7awjri8/3drotateMesh.c3p

    Here is an example. It builds a rotation matrix from a series of rotations and then applies that to the corners of the quad to do the distort. Since the quad is flat its slightly simpler than if we wanted to handle z too.

    Notes:

    * Project property: "z axis scale" is set to regular.

    * The object's size is set to 1x1 and we set the size from the scale function.

    * Distort points can't have a z<0. So to work around that we set the zelevation to -1000, and add 1000 to the zelevation of the distort points.

  • Sounds like you just want to rotate the distort mesh around some other axis besides the z axis like setting the angle does.

    You can search the forum for “rotate around a point” or “rotate around x axis” to get you the math involved. Search posts by me for 3d rotation and I think there’s some examples too.

    The math involved is just taking the corner points and multiplying each one by a rotation matrix. Ideally it would only need to be an 2d rotation which simplifies the math. Alternately you could multiply them by a rotation quaternion. Anyways, just some ideas where to look to get a possible solution. At least till someone can make and example.

  • So all you’re doing is creating icons and text on buttons when they are created depending on some Boolean instance variables?

    Any reason why the text is pulled from an array instead of just being put in an instance variable of the button?

    Here’s a possible way you could do it.

    button: on created
    -- button: boolTextVisible
    -- -- create text at button
    -- -- text: set text to button.text
    -- button: boolIconVisible
    -- -- create icon at button
    
    on clicked on button
    -- call shimmyAndShake
  • Look at the local storage plug-in. That’s persistent storage. It’s also possible to interact with a server to store files there. But that’s probably overkill. Also if you use desktop export you can actually read and write files.

  • Probably best to create a new topic asking about Q3d since I’ve never used it and don’t have it. That would give better visibility for anyone who actually use/used it.

    With this plug-in you can’t access vertex positions. What you can do is make another object and position it relative to another object. So if you know the original vertex position (say 1,2,3) you can position and object to that but use the relto field to be the other object that’s rotating.

    Anyways, just a possible solution idea. I haven’t been on a computer for months so I haven’t tested this.

    For the second question, I don’t have a capx. The post I made seems sound. Guess you could do it with the move at angle action too.

    Sprite2: set position to center

    Sprite2: move 100*cos(10*time) pixels at angle center.angle

    Sprite2: move 50*sin(10*time) pixels at angle center.angle+90

    Anyways, you probably would get better help with a new topic. There are a lot of users that have the time to check what the issue with your capx could be. Or they could give their own solution with more support than I can currently give. I only offer solutions off the top of my head lately. All I can guess is if it’s working for one object and not the others is the other objects aren’t using the same code or you’re overlooking some picking aspect or something.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I mostly have no idea what you’re doing. All I can guess is the object is being clipped by the near plane of the camera when you place an object near the camera. The logical solution is to just move the camera back or the objects further from the camera. You can also mess with where the near plane is when setting up the camera but that probably isn’t what you should mess with.

  • Simplest way would be to use browser.execjs() on that text string. You can access variables with the scripting api but it’s simpler to just provide the values manually.

    Here is an example. It runs the code as as JavaScript and the globals a and b are prepended to that. It’s simple to add more.

    text var result=""
    text var js=""
    text var code="a== 42"
    
    // globals
    number var a=42
    number var b=33
    
    on click
    -- set js to ""
    -- add "let a="&a&";" to js
    -- add "let b="&b&";" to js
    -- add code to js
    -- set result to browser.execjs(js)

    You could do something clever to have it automatically retrieve the variable values. There are also other ways to parse it.

    The pros of doing it this way are you don’t have to deal with any parsing and you can run any JavaScript. The cons are you don’t have a way to really deal with errors and you can run any JavaScript which can be considered a vulnerability to your game.

  • You have the right idea. To bounce you’d need the angle between where the objects hit. But that can be simplified to just the angle from one object to another. Then you can do the bounce in two ways. One is to use the angle of motion and the other is to use xy velocities.

    The angle of motion way.

    Var n=0
    A collides with B
    — set n to angle(a.x,a.y,b.x,b.y)
    — a: set angle of motion to 2*(n+90)-self.angleofmotion
    y)
    — b: set angle of motion to 2*(n+90)-self.angleofmotion

    I’m short on time to write the xy way. But it is expandable to handle differing masses.

    However the one snag in all this is the pathfinding behavior. Does it even let you change the velocity? It mostly just moves along the found path and doesn’t really handle deviations from that path.

    Maybe have do the enemies with two objects. One with pathfinding and the other with physics that gets a force applied to move toward the pathfinding object. Maybe stop the pathfinding object when it’s too far from the pathfinder so it can catch up

  • Well backup your project first before trying any of this.

    If you open the c3p file with a zip program and open the .proj file has the version that you can change to make it so you can possibly open it up in an older version of c3. If you didn’t change your project since then you can see what version you used then. Chances are high it won’t work though if your project uses any new features.

    The second part is opening up an older version of c3. You can specify the version in the url. You’ll need to try out the various versions to see when the c2runtime option was removed or search the release notes.

  • There is a point where a tricky workaround isn’t worth it. 3d vr would require rendering once per eye I’d guess and after that is more required to get it to a headset? No idea. Web browsers have limited capabilities but you can research what’s possible with js since construct doesn’t tout vr as a feature.

    Construct just sounds like it would get in the way if all you want to do is relay input and receive output from another program that interacts with the vr headset. But if this is really something you want to try I’d say go for it. You’ll find the feasibility of it as you go.

  • You’ll have to go back like 50 versions or so. The c2 runtime was removed as an option in later c3 versions.

  • What tools would you need? The only thing I can think of is maybe an isometric version of the tilemap object. Otherwise you can use a grid to pace sprites.

    A lot of the motion behaviors can be used well enough from an isometric view. For motion more aligned to the iso view you can utilize a bit of math.

    For the visual sorting it can be simple is all objects are the same size and cubes. For other shapes it gets more complicated and can yield unsortable cases.

    I think overall any engine that can draw images can do isometric.

R0J0hound's avatar

R0J0hound

Member since 15 Jun, 2009

Twitter
R0J0hound has 155 followers

Connect with R0J0hound