Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (TedMar, AndrewAMD), 1,344 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19053 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Need help with VECTOR #210634
06/11/08 20:12
06/11/08 20:12
Joined: Jan 2002
Posts: 454
Germany
CD_saber Offline OP
Senior Member
CD_saber  Offline OP
Senior Member

Joined: Jan 2002
Posts: 454
Germany
Hi there,

i want to move an object (with physics) away from the player. It need the vector of the direct line between the player and the object... can someone please help me to get this vector? (i just need a 2 dimensional vector x,y)

Thank you!


Ja, lach du nur du haariges Pelzvieh!
Re: Need help with VECTOR [Re: CD_saber] #210636
06/11/08 20:16
06/11/08 20:16
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
Code:
VECTOR edir;
vec_set(edir, you->x);
vec_sub(edir, my->x);
vec_normalize(edir, 1);


Re: Need help with VECTOR [Re: Joey] #210639
06/11/08 20:26
06/11/08 20:26
Joined: Jan 2002
Posts: 454
Germany
CD_saber Offline OP
Senior Member
CD_saber  Offline OP
Senior Member

Joined: Jan 2002
Posts: 454
Germany
thank you for your reply,
could you please explain the code? could you write it for an objects called "object" and "player"

Last edited by CD_saber; 06/11/08 20:27.

Ja, lach du nur du haariges Pelzvieh!

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