Bug with Position & Angle in Transport menu

User Tag List

Results 1 to 3 of 3
  1. #1
    Torpedoes's Avatar ★ Elder ★ Doomsayer
    Authenticator enabled
    Reputation
    1147
    Join Date
    Sep 2013
    Posts
    956
    Thanks G/R
    148/415
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Bug with Position & Angle in Transport

    Hi, as I continue to polish my radar for its eventual release, I would like to fix a small bug. As I found out from asking this (Position Offset in Vehicles) question, I'm able to determine the transport GUID using the UnitTransport offset. I then add the position and angle of that transport to the unit riding it:

    Code:
    unit.X += transport.X;
    unit.Y += transport.Y;
    unit.Z += transport.Z;
    unit.Angle += transport.Angle;
    The problem I'm running into is most prevalent on boats (haven't tested zeppelins) where both the 2D radar and 3D overlay seem to be suffering from some anomaly. The 2D radar seems to be having some issues with angles, even though the angle of the boat is zero and other vehicles like siege engines work fine. The 3D overlay has some other issue which I also can't figure out, all I know is the camera position and direction are correct, so perhaps also angles? To help illustrate my problem I have created several screenshots:

    Stormwind boat to Borean Tundra
    On land, about to step on boat: https://i.imgur.com/tOUCorL.jpg
    On boat, Angle seems to be shifted about 180 degrees: https://i.imgur.com/GL59ZOD.jpg
    On boat, another angle to show guards: https://i.imgur.com/iV1sdxF.jpg

    Borean Tundra boat to Stormwind
    On land, about to step on boat: https://i.imgur.com/GK0v06a.jpg
    On boat, problem less evident but still there: https://i.imgur.com/pTMiV5l.jpg

    My World to Screen function uses a custom view matrix that I build using the Camera Position / Direction / Fov. It works perfectly everywhere except on certain transport vehicles. Again the camera position and direction have been tested to be always correct.

    I know I haven't made myself entirely clear but hopefully someone will be able to help me find a solution.

    EDIT: Discussion continued Here!
    Last edited by Torpedoes; 03-31-2014 at 06:07 PM.

    Bug with Position & Angle in Transport
  2. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1511
    Join Date
    May 2008
    Posts
    2,432
    Thanks G/R
    81/333
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Torpedoes View Post
    Code:
    unit.X += transport.X;
    unit.Y += transport.Y;
    unit.Z += transport.Z;
    unit.Angle += transport.Angle;
    This is wrong (you will see in the previous thread, MaiN corrected me,) you need to transform your position and angle based on the transport's matrix (recursively.)

    Originally Posted by MaiN View Post
    This is not right. You need to transform your position by the transports world matrix (which is calculated by multiplying its matrix by its transports matrix, in turn, etc.). Just adding the position will not handle rotation correctly.
    Here's what happens when you do not take angle into account when transforming your position. This is what you're doing wrong:



    Last edited by Jadd; 03-31-2014 at 03:18 AM.

  3. #3
    broly7's Avatar Banned
    Reputation
    50
    Join Date
    Oct 2009
    Posts
    98
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Jadd View Post
    This is wrong (you will see in the previous thread, MaiN corrected me,) you need to transform your position and angle based on the transport's matrix (recursively.)



    Here's what happens when you do not take angle into account when transforming your position. This is what you're doing wrong:




    Watch out! You can turn into female.

Similar Threads

  1. Bug with my model edit...
    By namas in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 09-04-2007, 11:36 AM
  2. Hunter bug with SWS damage meter mod.
    By Smashy in forum World of Warcraft Exploits
    Replies: 12
    Last Post: 08-23-2007, 12:18 AM
  3. WotF bug with intimidating shout
    By The New Guy in forum World of Warcraft Exploits
    Replies: 5
    Last Post: 01-16-2007, 03:00 AM
  4. Freaky bug with the Winter Revelers
    By Avianar47 in forum World of Warcraft Exploits
    Replies: 15
    Last Post: 12-23-2006, 04:44 PM
  5. bug with the karazhan floating over goldshire thing.
    By raamoz in forum World of Warcraft Exploits
    Replies: 9
    Last Post: 07-24-2006, 12:38 AM
All times are GMT -5. The time now is 06:00 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