LeoPixelStudios's Recent Forum Activity

  • LOL!! yeap! that's exactly what I'm looking for.. but i don't quite get the calculations? Do you understand it?

    x = Self.X>960?960:(Self.X<0?0:Self.X)

    y = Self.Y>519?519:(Self.Y<0?0:Self.Y)

    thx!

  • i know you solved it, but here is my solution, not even sure if this is what you wanted :D

    touch Controler

    but if your title is corect, in order to turn the angle towards a object position when you click it, just give it a target XY and use the sprites functionality "turn angle towards position" and it will rotate towards that object.

    Hello George! I tried your project.. It does work like i wanted... I'm studying your method, because I do not know this function.. Thanks!! always learning! ;)

  • Hello, I'm trying to create a magnifier effect with a mask and can't figure out how to do it.

    my BG is a still image. On top another layer with my "magnified animation" now I want to create round mask so we don't see all 800x400 size animation, but rather the shape of a magnifier.

    No matter how I put it, the layer underneath gets affected, which I don't want.

    And it doesn't matter if I put "use own texture" . My mask is the top-most layer on the.. layer ;)

    So technically I just want the mask to operate on my layer and not all the layers.

    And is it normal that I don't see the result unless I run the project?

    thx!

    Marc.

    Tagged:

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.

  • 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.

LeoPixelStudios's avatar

LeoPixelStudios

Member since 18 Mar, 2014

None one is following LeoPixelStudios yet!

Connect with LeoPixelStudios

Trophy Case

  • 10-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies