• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

RWarp Mod: 3D directional warp

id_skew

New member
Joined
Jul 1, 2005
RedCents
The current RWarp implementation of directional warp supports X and Y only. The following uses the character camera angle and calculates for X, Y and Z accordingly using the polar equation of a sphere.

I wrote this for my own warp plugin a few months ago, but I've gotten lazy lately and unless I want to do something special, I find myself using the posted compiles. If someone could throw this into a compile from now on, that would be great.

Replace:

Rich (BB code):
FLOAT angle = (FLOAT)((pChar->Heading)*0.0123); 
FLOAT dissafegoto = (FLOAT)atof(Y); 
DoWarp(pChar->Y + (FLOAT)(dissafegoto * cos(angle)), pChar->X + (FLOAT)(dissafegoto * sin(angle)), pChar->Z);

with the following:

Rich (BB code):
double Heading=pChar->Heading/(256/PI);
double CameraAngle=pChar->CameraAngle/(256/PI);
float posX=(float)(atof(Y)*sin(Heading)*cos(CameraAngle)+pChar->X);
float posY=(float)(atof(Y)*cos(Heading)*cos(CameraAngle)+pChar->Y);
float posZ=(float)(atof(Y)*sin(CameraAngle)+pChar->Z);
DoWarp(posY, posX, posZ);
 
Holy crap you gave me a good idea

Do you mind if I steal and rape the shit out of this code as long as I give you credit?
 
updated rwarp. very nice work. always wanted to do something like that. just not sure how .. thanks
 
So correct me if im wrong but this allows you to say look up at a ledge and using a distance (guess of course) warp towards it?
 
yes basiclly.. it will warp in the direction that you are looking (be sure to be in 1st person veiw)
 
Lol whatcha thinking of TP? Being able to warp to wherever you point your mouse? :)
 
RWarp Mod: 3D directional warp

Users who are viewing this thread

Back
Top
Cart