[HELP]  Underwater or underground objects menu

User Tag List

Results 1 to 6 of 6
  1. #1
    Hrap's Avatar Member
    Reputation
    13
    Join Date
    Oct 2018
    Posts
    123
    Thanks G/R
    16/5
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    [Help] Underwater or underground objects

    hi, can anyone help?
    How to find out,
    whether the object is underwater or underground,
    such as ore or grass
    Last edited by Hrap; 02-01-2023 at 06:28 AM.

    [HELP]  Underwater or underground objects
  2. #2
    oiramario's Avatar Established Member
    Reputation
    85
    Join Date
    Mar 2021
    Posts
    133
    Thanks G/R
    36/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check pos.z with liquid height it means above or under water.

  3. Thanks Hrap (1 members gave Thanks to oiramario for this useful post)
  4. #3
    MrFade's Avatar Contributor CoreCoins Purchaser
    Reputation
    101
    Join Date
    Aug 2015
    Posts
    152
    Thanks G/R
    38/63
    Trade Feedback
    2 (100%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Depending on your meshes you can also check the flag of the nearest poly around the nodes vector.

  5. Thanks Hrap (1 members gave Thanks to MrFade for this useful post)
  6. #4
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    For nodes specifically you can infer some characteristics from a traceline query. This is not *entirely* accurate -- there are some edge cases -- but it is the simplest option. If you need higher precision you will need to do a sphere intersection with the map geometry.

    Run a terrain/wmo traceline from [node.x, node.y, node.z + node.iteractDistance] to [node.x, node.y, node.z - node.interactDistance]:
    1. No hit means the node is "floating" and is probably invalid (this should rarely happen: edge case; or ostensibly spawned in a broken position underground or something.)
    2. WMO hit means it is attached to a building or cave.
    3. Terrain hit means it is above ground.

    To check if a node (or any position) is underwater, there is a better option to consider using over traceline - it is possible that there are liquid chunks above the node without the node necessarily being underwater.
    Code:
    delegate bool World::QueryLiquid(nint world, in Vector3 position, out int liquid, out float surface);
    
    // Usage:
    var world = World::GetActiveScene();
    var underwater = World::QueryLiquid(world, node.Position, out var liquidId, out var surface);

  7. Thanks Hrap (1 members gave Thanks to Jadd for this useful post)
  8. #5
    Hrap's Avatar Member
    Reputation
    13
    Join Date
    Oct 2018
    Posts
    123
    Thanks G/R
    16/5
    Trade Feedback
    0 (0%)
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Heh... Thanks a lot for help
    This turned out to be a very difficult task for my.
    I don't know yet how to start tracing lines.
    All I have is the position of the player and the node.
    I understand that I need to check if there are polygons between the player and the node.
    But how and where to read these polygons, I don’t know
    Last edited by Hrap; 02-06-2023 at 07:52 PM.

  9. #6
    oiramario's Avatar Established Member
    Reputation
    85
    Join Date
    Mar 2021
    Posts
    133
    Thanks G/R
    36/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    const uint32_t WorldIntersect = 0x7A3B70;
    Search the forum for how to use it.

    for liquid you must read acore code.

  10. Thanks Hrap (1 members gave Thanks to oiramario for this useful post)

Similar Threads

  1. [Help!] Scripting a GO object with LUA???
    By pioneer1337 in forum World of Warcraft Emulator Servers
    Replies: 5
    Last Post: 07-31-2008, 11:55 PM
  2. Pet Help and or direction
    By Irishwildman in forum World of Warcraft Emulator Servers
    Replies: 0
    Last Post: 07-26-2008, 03:43 PM
  3. NPC or Game Objects Spawn After Quest?
    By Bapes in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 05-07-2008, 03:29 PM
  4. Authentification Failed!Help plz..or just take a look at my problem ?
    By Arugos in forum World of Warcraft Emulator Servers
    Replies: 6
    Last Post: 12-28-2007, 03:48 AM
  5. HELP!! GLider or that other 1!!(open bot!)
    By hallerz in forum World of Warcraft General
    Replies: 2
    Last Post: 08-06-2007, 06:58 AM
All times are GMT -5. The time now is 08:35 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search