Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (dr_panther, 7th_zorro), 1,203 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
my.oriented #161164
10/15/07 19:26
10/15/07 19:26
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline OP
Junior Member
ChildeHarold  Offline OP
Junior Member
C

Joined: Jul 2006
Posts: 96
I read my oriented is obsolte - and it dosn't work any more.
But it must be replaced by something - by what?

Re: my.oriented [Re: ChildeHarold] #161165
10/15/07 20:24
10/15/07 20:24
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
by setting pan or tilt != 0

if you want to have it 0 set it to 0.001...

Re: my.oriented [Re: ChildeHarold] #161166
10/15/07 20:29
10/15/07 20:29
Joined: Jul 2006
Posts: 96
C
ChildeHarold Offline OP
Junior Member
ChildeHarold  Offline OP
Junior Member
C

Joined: Jul 2006
Posts: 96
thanks Scorpion, one follow up question though;

that means I have to type in the real pan or tilt value? Although it's done in WED?

Re: my.oriented [Re: ChildeHarold] #161167
10/16/07 13:31
10/16/07 13:31
Joined: Mar 2006
Posts: 752
Portugal
demiGod Offline
User
demiGod  Offline
User

Joined: Mar 2006
Posts: 752
Portugal
from the manual:

Quote:


For orienting the entity in a certain direction or towards a certain point in space, use the vec_to_angle function.





so,

Code:

function turn_towards_target()
{
// get the direction from the entity MY to the entity YOU
vec_set(temp,your.x);
vec_sub(temp,my.x);
vec_to_angle(my.pan,temp); // now MY looks at YOU
}




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

Gamestudio download | chip programmers | 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