Overlapping position

  • In this .capx, :http://www.2shared.com/file/ta9Cdncq/Overlaps_point.html

    ,

    The "LineChange" and "LineAngle" overlaps at different positions.I want to know where(X and Y position) they are overlapping.This is a little confusing so please have a look at the capx.

  • I can't open the file (I need to register on the website...) but you can compare a "distance(sprite.X,sprite.Y, sprite2.X,sprite2.Y)"...

    for example, if you like to make some event if some sprite overlapping but more close, or in different position, you can compare the distance....

  • No.You can press the download button below.

    No,it's not like that,the two sprites are overlapping at an angle.

  • The upsidedown image should be scaled to reach the overlapping position every second.

  • Looks like optics test, image making with convex lens?

    For me it looks like: For this particular need, you'll just have to resort using some real math. Since you know the angles and zero-Y crossings (the blue line) of each red lines, finding the image point it's not hard math at all.

    If you'll know the focal distance, there's thin-lens formula at en.wikipedia.org/wiki/Lens_%28optics%29 that can directly give the x.cord of the point.

  • ok.I'll try.

  • I've used maths and this is the result.I don't know what's wrong here.The maths is right.I am sure.

    2shared.com/file/_gZc3TlD/Lens_-_Copy.html

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well. X-pos of the arrow looks to be just ok to me. Y-size is somewhat out, and I have to say that reading the equations ain't the easiest.

    AHA..

    Problem is that your RealImage -sprite has some extra transparent pixels at the top of the image. Image size is higher than the visible area, thus the scaling fails.

    Use "crop transparent edges" at the image editor. That seems to image length.

    Also.. You can just delete subevents 11 and 12 .. those are not needed at all. Actually it works better without them.

    dropbox.com/s/0ckrhcrlu3cmqi3/Lens2.capx

  • Joannak

    Sorry for the late reply.

    That file doesn't work on r152

    However,your post was very good.I have made the program complete now.

    How do I upload it to web?I want it to be HTML5.

  • You are still using R152? That's quite old. I'd recommend you to download the latest Stable R158.2

    scirra.com/construct2/releases/r158.2/download

    To upload your code, firstly you need to make suitable version for web use.

    • Select File-menu/Export.
    • From the upcoming window, choose HTML-5 and then select where to save the files.

    -> Construct will automatically make Index.html and necessary files.

    After that, you should need to upload those exported files to some site where others can see them.

  • Joannak,sorry Its 158.the 158.2 is just a bug fix for Iphones or somethi ng.

    Okay.Thanks

  • Well. I'm not sure if the versions are 100% compatible. And if the file don't open, it's most likely due different version of C2 ..

  • Do you know of any such websites where you can upload your game for free?

  • Joannak

  • Do you know of any such websites where you can upload your game for free?

    Lots of people here just use dropbox.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)