LeoPixelStudios's Forum Posts

  • Set angle to clamp(lowerbound,angle(self.x,self.y,target.x,target.y),upperbound)

    IIRC, angle() returns a value between -180 and 180 with 0 facing right, so take that into account when setting your lower and upper bounds.

    Thanks!!! will try that as well.

  • F-O-U-N-D I-T!!!

  • Hello. I am trying to make an object "on drag" rotate from it's pivot point. So how I went about it so far is...

    1. I created my "draggable" object and gave it a clamp value of 100,300 on the vertical axis. that works fine. But when I drag this object, I want another object to rotate according to the drag value a certain amount of degrees. (ex: between 20d and 360d).

    Is there a way to "map" a range from an object to another object. EX: range 100,300 to angle 20, 360?

    If not, then I have to find where in the range of my dragged object I'm at, convert it to a percentage, then do the same math on my rotating object, correct?

    Thx!

    Marc.

    Tagged:

  • Haa!! nice! thank you! I'll try that right away!

    thank you!!

    Marc.

  • hi, so you want a picture inside a picture like a CTV monitor showing camera footage from another part of the layout?

    you could do that by events, using a minimap like format, i think i had a Tank demo with a minimap around the tutorial area... for C2... il see if i can find it... meanwhile there is this youtube video doing the same thing

    Edited: on the other hand, i think you could make it happen with Canvas... basically pasting inside a small area a layout position xY with the items inside ... might be cpu intensive... but is basically how the above examples work i think.

    It is similar to this indeed, but I want a "Zoommed in" view, like if I had a magnifying glass over the portion of the Canvas that I wanted to view.

    I thought I could create a drawing area, then take a snapshot of the whole canvas and pasting it onto the drawing canvas, but it's not working.

  • Hello!, I am trying to find the right way to make an object rotate clockwise or counter-clockwise for lets say 1 second.

    Basically I have a dial, and when I move the mouse over object 1, the needle rotates 80 degrees clockwise.

    If I move the mouse over Object 2, then the needle rotates 40 degrees clockwise.

    I know I have to use lerp to do this, but putting >lerp(0,80,1*dt) does nothing.

    thx!

    Marc.

    Tagged:

  • Thanks George, very nice result (yes indeed it's what I was looking for) ... I got it to work with InDRekt's solution.

    I will study yours, because I'm not too good with sin and cos (Physics weren't mandatory at school LOL) so i missed on some essential game physics.

    cheers!

    Marc.

  • Very cool!!! thank you so much!

    cheers!

    Marc.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yeap, like you said, it's a working solution, but not the best, especially that I need the collision boxes to expand and retract.

    Thx! for the reply.

  • Hello! I'm trying to simulate a molecular movement. the more heat the greater the movement. For now I got the basics covered. I put approx. 10 particles (sprites) on my canvas, and with physics have them bounce around 4 invisible rectangular sprites forming a box.

    What I am looking to achieve is that the particles would be "trapped" inside a circle and have the circle expand and contract to give the particles more space to travel.

    Is this something doable. I am assuming it would have something to do with the collision shape, but not sure how.

    thx!

    Marc.

    Tagged:

  • Do you mean this?

    https://howtoconstructdemos.com/auto-zoom-and-scroll-the-screen-to-fit-multiple-characters/

    Hello. thx for the response, but no, it's more like the next post, having a picture-in-picture of another portion of the canvas.

    thx

  • Do you mean having another view port inside your main view port that shows a close up of something on your layer? If so, it's not possible in Construct 3 to render another viewport. You would have to simulate it somehow.

    This post discusses some of the same concepts: construct.net/en/forum/construct-2/how-do-i-18/possible-create-multiple-115762

    Yes! that's exactly it, I'm trying to create a "zoomed in" representation of the balloon to fit in the windows.

    dropbox.com/s/aow40ez65hylhn6/weatherballoon.c3p

    thx!

  • Hello, how do i (if it's possible) to add a camera that would show a zoommed in content of another object on the same layout?

    thx!.

  • So, I found a solution. Instead of using "on start of layout" I changed it to "on loader complete" ...

    I guess it was trying to read the file before finishing loading.

    Anyways, I posted another issue on the export.. but that's another thread lol :)

    thx!

  • Hello, so I have a drag and drop type of quiz and they array 4x2 is fed by a .json file.

    Everything is working fine in construct 3, I tested it with the QR code on my phone (iphone) But when I actually export it and put it on my server (https) then there's a black screen.. that's it!

    Any ideas why?

    thx

    Marc.

    Tagged: