A_FacePosition

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: GZDoom Developers

User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

A_FacePosition

Post by Matt »

Like A_Face but with an arbitrary vector3 instead of an actor.

(Does something like this already exist? I feel like this has been discussed before but I see nothing on the ZScript actor function list on the wiki)
User avatar
Major Cooke
Posts: 8175
Joined: Sun Jan 28, 2007 3:55 pm
Preferred Pronouns: He/Him
Location: QZDoom Maintenance Team

Re: A_FacePosition

Post by Major Cooke »

User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: A_FacePosition

Post by Matt »

Right, I think that's how I eventually did it last time!

Still would be nice to have a single step for something like this though, since this would be quite a few additional steps subtracting coords and doing the vectorangle for both x/y and xy/z.

(Right now the most "obvious" way to get around this for a DECORATE user is to create an actor at the desired spot and call A_Face, which is very computationally expensive for what we're doing but by far the most convenient and foolproof thing to write.)
Post Reply

Return to “Feature Suggestions [GZDoom]”