Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 06/24/26 18:31
Z9 getting Error 058
by flip26. 06/24/26 13:57
Lapsa's very own thread
by Lapsa. 06/20/26 18:18
Ranger by Robert Pardo - now for Zorro
by Smallz. 06/20/26 11:23
Z12 live performance
by jcl. 06/19/26 11:21
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (TipmyPip), 3,807 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
face enemy towards player #168398
11/20/07 07:31
11/20/07 07:31
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
whats a quick way to get the pan of an enemy to always face the player?

Re: face enemy towards player [Re: immolat3] #168399
11/20/07 14:42
11/20/07 14:42
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
get your manual and search for vec_to_angle


Click and join the 3dgs irc community!
Room: #3dgs
Re: face enemy towards player [Re: Joozey] #168400
11/20/07 14:55
11/20/07 14:55
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
VECTOR* Temp_vec1 = {x=0;y=0;z=0;}
...
...
function ENEMY()
{
vec_to_angle(my.pan,vec_diff(Temp_vec1,Player.x,my.x));
}

Re: face enemy towards player [Re: Widi] #168401
11/20/07 18:01
11/20/07 18:01
Joined: Nov 2007
Posts: 73
I
immolat3 Offline OP
Junior Member
immolat3  Offline OP
Junior Member
I

Joined: Nov 2007
Posts: 73
worked like a charm, thanks!


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1