Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, OptimusPrime, AndrewAMD), 14,882 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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