|
1 registered members (AndrewAMD),
1,248
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: 3rd camera perspective must follow a ball
[Re: DJBMASTER]
#216920
07/19/08 21:56
07/19/08 21:56
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
The manual is your best friend vec to angle, example section: 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
}
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Re: 3rd camera perspective must follow a ball
[Re: Michael_Schwarz]
#217270
07/22/08 12:08
07/22/08 12:08
|
Joined: Mar 2008
Posts: 104
theDust
OP
Member
|
OP
Member
Joined: Mar 2008
Posts: 104
|
@DJBMaster Try it and you will see the camera rotates a bid crazy . Ähm Michael, könntest du mir diese 3 Zeilen Code ein bisschen erklären ? Aus dem Manual werd ich nicht ganz schlau. Was muss ich bei "temp" einsetzen ? Im Manual steht ein Richtungsvector aber welcher ?
|
|
|
Re: 3rd camera perspective must follow a ball
[Re: theDust]
#217322
07/22/08 17:14
07/22/08 17:14
|
Joined: Aug 2003
Posts: 7,439 Red Dwarf
Michael_Schwarz
Senior Expert
|
Senior Expert
Joined: Aug 2003
Posts: 7,439
Red Dwarf
|
bei temp musst du nichts ersetzen,
ersetze "your" durch "player" und "my" durch "camera", ganz einfach.
Dann den code ausführen in einer schleife und gut is
Last edited by Michael_Schwarz; 07/22/08 17:14.
"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|
|
|