Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Create wings with particles

Comments in 'Plugin Development' started by MCPEPIG, Mar 23, 2016.

  1. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    Nawaf_Craft1b likes this.
  2. Intyre
    Offline

    Intyre Staff Member PocketMine Team

    Joined:
    Aug 24, 2013
    Posts:
    118
    Minecraft User:
    Intyre
    Then do math!
    PHP:
    $particle->setComponents($x1+$x2$y1+$y2$z1);
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    It is actually quite a good idea to fill curves using equations too.

    https://www.desmos.com/calculator/p5be4zf6xi

    Let f() and g() be the upper and lower bounding curves.
    Code:
              0.0001 (x + 20)^4 - (x + 20) {-50 <= x <= 0}
    f(x) = {
              0.0001(x - 20)^4 - (x - 20) {0 <= x <= 50}
    
    For example:

    PHP:
    for($x = -50$x <= 50$x++){
      for(
    $y round(g($x)); $y <= round(f($x)); $y++){
        
    dot($x$y);
      }
    }
    If you can curve a beautiful graph, you can use a method like this.
    Skullex and Primus like this.
  4. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    and now rotate it :p
  5. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    That's a minor thing; just multiply the X coordinate with relevant sines or cosines.. But it would be more interesting if you want to make it 3D. For example, a pair of wings should point frontwards at the top and bottom but point backwards at the middle.

    BTW were you trying to make Mockingjay?
  6. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Umm, sorry but I dont get your code working, because particle->x and particle->z are null
  7. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Then tell me/us what is wrong with PEMapModder's code please?
  8. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    My code was not real code. I wrote it as pseudo-code, just that it looks very alike to real code ;)
    Just understand my theory, rewrite it yourself, and post it here if you want to or have problems with it.
    Legoboy0215 likes this.
  9. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    A radical view of an open-source terrorist: everything that isn't open-source is useless. Therefore, MCPE is useless (but someone managed to break it down into similar to partial open-source, hence we have the magic here in the MCPE community) (but you can't partially open-source a server with a similar method) (we're here discussing the algorithm, so Wireshark is useless in this case) (who cares about the shops) (free software movement).
    Tim // robske Büba likes this.
  10. MyNameIsTriXz
    Offline

    MyNameIsTriXz Notable Member

    Joined:
    Aug 17, 2015
    Posts:
    538
    Minecraft User:
    MyNameIsTriXz
    Thats all I got so far, if it interests you:

    [​IMG]

    Or:

    [​IMG]

    Or:

    [​IMG]


    I just converted images to ascii text and then I did input in a file, my code does the rest.
  11. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Your images are "view" HTML links. You should link to the permalinks, such as http://img4web.com/i/DRUSP3.png


    [​IMG]

    Or:

    [​IMG]

    Or:

    [​IMG]
    MyNameIsTriXz likes this.
  12. thebigsmileXD
    Offline

    thebigsmileXD Banned

    Joined:
    May 19, 2015
    Posts:
    845
    Plugins:
    1
    Minecraft User:
    XenialDan
    *PM Community.
  13. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Not really, I actually included the modding community too, for people who made tools to make MCPE more understandable.

Share This Page

Advertisement