Zaloguj się by uzyskać pełen dostęp. Nie masz jeszcze konta? Założ je już teraz w kilka sekund.

Wysłany: 2012-06-03, 21:44


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Pioruniasty
Mam problem z t? twoj? funkcj? w debugerze wyskakuje mi to
Kod:

.lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]


Prosze o szypk? pomoc :piwo:

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-03, 21:52


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

13 argument?w powiniene? mie?. Sprawd? czy masz wszystkie.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-06, 17:56


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Pioruniasty zobacz to kod

Kod:




function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove)
local x = 0
local y = 0

function moveCamera()
x = x + 0.009
y = y + 0.009
local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, typeCameraMove)
local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, typeCameraMove)
setCameraMatrix(256, 656, 50, 1, 2, 3)
if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then
removeEventHandler("onClientRender", getRootElement(), moveCamera)
end
end
addEventHandler("onClientRender", getRootElement(), moveCamera)

end



cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1, typeCameraMove ) ----------------------------------


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-06, 23:26


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

13 argument ?le. Powinien by? string. Zerknij na wiki, a zrozumiesz. Chodzi mi oczywi?cie o funkcj? "interpolateBetween". Poza tym jakby? przeanalizowa? m?j kod to wiedzia?by? jak poprawnie u?y? funkcji.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-07, 14:37


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Jak zmieni?em na
Kod:

cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1, string )


to w debugerze mi wyskakuje :
Kod:

.lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got table]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got table]


Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-07, 20:34


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

:|

String - typ zmiennej, a konkretniej tekst. Przyk?ady string?w:
  • "Ala ma kota, kot ma al?"
  • "123"
  • "Dom numer 2304"


A teraz przejd? na wiki MTA ( dla u?atwienia: www.wiki.mtasa.com ), znajd? funkcj? interpolateBetween i sprawd? jakie warianty kryj? si? pod 8 argumentem.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-08, 15:18


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Chodzi ci o to "strEasingType"???

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-08, 17:08


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Yup.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-08, 18:36


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Pioruniasty,
To co mam tam wpisza?

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-08, 18:43


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

http://wiki.multitheftauto.com/wiki/Easing <- w tabelce kolumna "Easing function". Pami?taj, by by? to string, o kt?rym ju? wcze?niej wspomina?em.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-09, 13:03


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Pioruniasty,
wie? mi napisz jaki jest ten 13 argument bo ja tego niemoge co? ogarn?? :piwo: :piwo:

Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-09, 13:50


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Dobra, wpisz tam "Linear" i b?dzie po k?opocie.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-09, 14:31


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Po wpiszaniu "Linear" w debugerze wyskakuje mi taki b??d
Kod:

.lua:11 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]
.lua:12 Bad argument @ 'interpolateBetween' [Expected easing-type at argument 8, got nil]


Podpis
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-09, 14:48


Piorun







Wiek: 32
Na forum: 6712 dni
Posty: 1837
Nick w MP: Piorun

Piwa: 516

Respekt: 480,7
Respekt: 480,7

Kod poka?.

Podpis
Możesz mnie znaleźć na: Facebook
Postaw piwo autorowi tego posta
 

 
Wysłany: 2012-06-09, 14:58


emil880







Wiek: 30
Na forum: 5843 dni
Posty: 107
Nick w MP: None

Piwa: 74

Respekt: 50

Kod:


function cameraMoveSoft(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, typeCameraMove)
local x = 0
local y = 0

function moveCamera()
x = x + 0.009
y = y + 0.009
local cameraX, cameraY, cameraZ = interpolateBetween(camPosX, camPosY, camPosZ, newCamPosX, newCamPosY, newCamPosZ, x, typeCameraMove)
local lookX, lookY, lookZ = interpolateBetween(camLookX, camLookY, camLookZ, newCamLookX, newCamLookY, newCamLookZ, y, typeCameraMove)
setCameraMatrix(256, 656, 50, 1, 2, 3)
if cameraX == newCamPosX and cameraY == newCamPosY and cameraZ == newCamPosZ and lookX == newCamLookX and lookY == newCamLookY and lookZ == newCamLookZ then
removeEventHandler("onClientRender", getRootElement(), moveCamera)
end
end
addEventHandler("onClientRender", getRootElement(), moveCamera)

end


cameraMoveSoft(256, 656, 50, 653,254, 20, 1, 2, 3, 3, 2, 1,Linear) ----------------------------------


Podpis
Postaw piwo autorowi tego posta
 

 
Tagi: ruch :: kamery
Anonymous





Na forum: 245 dni
Posty: 1



Anonymous Koniecznie zajrzyj na:






Skocz do:  
Wyświetl posty z ostatnich:   
GTAONLINE.PL » JĘZYKI PROGRAMOWANIA » LUA » Ruch Kamery Ten temat jest zablokowany bez możliwości zmiany postów lub pisania odpowiedzi

Nie możesz pisać nowych tematów
Nie możesz odpowiadać w tematach
Nie możesz zmieniać swoich postów
Nie możesz usuwać swoich postów
Nie możesz głosować w ankietach
Dodaj temat do Ulubionych
Wersja do druku