User Tag List

Results 1 to 6 of 6

Thread: Y Ordering objects at an angle

  1. #1
    Clicker Fusion 2.5

    Join Date
    Oct 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Y Ordering objects at an angle

    I'm aware of using the layer object to sort objects by their Y value to create a fake 3D environment.

    However, I'm not quite sure how to pull this off with regards to diagonal objects.

    Something like this:
    http://imgur.com/8diArJn

  2. #2
    Clicker Fusion 2.5Fusion 2.5 Mac
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    zip2kx's Avatar
    Join Date
    Jun 2015
    Posts
    845
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    do the angle change in runtime? If not, cant you just order normally?

  3. #3
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleSWF Export ModuleXNA Export ModuleUnicode Add-on
    mobichan's Avatar
    Join Date
    Oct 2007
    Location
    Buffalo, NY
    Posts
    3,310
    Mentioned
    28 Post(s)
    Tagged
    0 Thread(s)
    This is a is a prime example of the problems you find in pseudo 3D games. Since you only have one positional value to test against on the angled object you need to either:

    1. Put the hotspot on the lowest point of the angled object and accept the object will always overlap the player.

    2. Put the hotspot On the highest point of the object and accept the player will always overlap it.

    3. Cut the object into smaller pieces (the same width of your player is ideal) so each piece will sort more accurately.

    4. Don't allow the player to overlap this object by using a separate collision shape.

    There is no ideal solution tbh. . You just need to be clever.

  4. #4
    Clicker Fusion 2.5Android Export ModuleFirefly 3D Module

    Join Date
    Sep 2010
    Posts
    577
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I usually do a bunch of "object is in area x y" ---> move in front of/behind player...or the lazy solution...i draw 2 masks and place them on the play area...mask 1 puts the player in front of objects and mask 2 behind the objects...could be tedious though if there are lots of different rooms

  5. #5
    Clicker Fusion 2.5

    Join Date
    Oct 2007
    Posts
    57
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hm, doing it manually did cross my mind. But then other actors (enemies, etc) will also have to be done manually and creating masks for every angled surface... that work will add up.

    Something I toyed with is putting the hot spot at one end of the wall's base and the action point at the other end and trying to calculate it that way, but I couldn't find a good solution that way either.

  6. #6
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,159
    Mentioned
    28 Post(s)
    Tagged
    1 Thread(s)
    diagonal walls are a real pain in such sitations
    I would avoid them completely... or split them in smaller entities, like mobichan suggests
    a good depth sorting solution can be (likely) pulled out if your pseudo 3d game is tiled and every element has the same size

    if this is not applicable, I would consider making detection zones as Klownzilla suggests
    (you could use a value for sorting, say Z, and set it to Y(object)
    then players overlapping front zone get a +wallOheight bonus)
    but then you should design the stage in order to not have other conflicting objects in the same area,
    like another wall in front of player staying behind, or a character overlapping another and one of the two not triggering the zone bonus

    depth sorting in a 3D environment is not trivial unfortunately,
    it requires a lot or testing and computation
    (see Z-buffering, bsp trees, painter's algorithm...)
    you could even build up something like that, if you don'thave loads of elements,
    fire a loop for each object, and do a serie of test (nested loops) with overlapped objects,
    that will determine a "catalogue" of the single elements (who/what is in front or behind who/what)
    basically by determining if above or below its "base line" (some math would do)
    and then make a final score to assign general depth values for the layer object

    ..or simplify your model to avoid all those issues of a 3D space

Similar Threads

  1. Help! Ordering objects by y value?
    By dylan6091 in forum Fusion 2.5
    Replies: 3
    Last Post: 10th September 2015, 12:51 AM
  2. Replies: 11
    Last Post: 8th June 2015, 08:31 PM
  3. Ordering lots of backdrop objects problem...
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 18th May 2009, 06:35 AM
  4. Caulculate angle between two objects
    By DistantJ in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 30th January 2009, 02:52 PM
  5. How to see angle between 2 objects
    By Dynamite in forum Multimedia Fusion 2 - Technical Support
    Replies: 10
    Last Post: 14th May 2008, 09:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •