Bun venit pe SkullBox!

Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
  Pagini: [1]
  Imprimă  
[DBPro]Miscarile camerei pe baza unui obiect  (Vizualizari 625)
zapakitul
*

Conectat Conectat

Mesaje: 1471

[DBPro]Miscarile camerei pe baza unui obiect, Iun 17, 2007, 21:24

Cod:

rem modul de display
set display mode 1280,720,32

sync on : sync rate 60
rem incarcam obiectul si il dimensionam - terenul
 load object "Land.x" ,1
scale object 1,2080,2080,2080
rem incarcam masina si o pozitionam pe teren
load object "car.x",2
position object 2,0,20,0
rem creem camera si o pozitiona,
make camera 1
position camera 1,20,40,0


do


rem daca apasam tasta W obiectul 2 se misca ianinte cu viteza 5
   if Keystate(17)=1 then
      move object 2,.5
rem daca apasam A obiectul 2 se roteste spre stanga
   if Keystate(30)=1 then
      any = any -1
rem daca apasam D obiectul se roteste spre dreapta
   if Keystate(32)=1 then
      any = any +1
rem daca apasam S obiectul merge spre spate cu viteza -5
   if Keystate(31)=1 then
      move object 2,-.5

 rem rotim obiectul 2 si il pozitiona,

yrotate object 2,any
position object 2,object position x(2),cary,object position z(2)

rem spunem camerei sa urmareasca obiectul 2
SET CAMERA TO FOLLOW 1,object position x(2),object position y(2),object position z(2), any,6,3,15, 0

sync
loop

Codul e  destul de explicat si usor de urmarit!
Memorat

A DS , my kindom for a  DS!

Un Pc De Carcasa Noua Blog
SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Ethical hacking and programming community
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro