SA-MP Forums Archive
AttachCameraToDynamicObject bugs/glitches - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: AttachCameraToDynamicObject bugs/glitches (/showthread.php?tid=661882)



AttachCameraToDynamicObject bugs/glitches - StRaphael - 17.12.2018

Hello there, I have some problems here
So, when I am trying to set player's camera attached to an object while he's(the object) is moving, the camera stuck(dosn't move, while the object yes( I think so )).
My code looks like this:
PHP код:
SnowObject[playerid] = CreateDynamicObject(18864coordsfrom[0], coordsfrom[1], coordsfrom[2], 000);
AttachCameraToDynamicObject(playeridSnowObject[playerid]);
MoveDynamicObject(SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19); 
What is wrong with my code?
Can someone testing this function/find out what the problem is?
Thank y'all in advance!


Re: AttachCameraToDynamicObject bugs/glitches - Infin1ty - 18.12.2018

Код:
AttachCameraToDynamicObject(playerid, SnowObject[playerid]); 
MoveDynamicObject(playerid, SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);
Swap these two to become...
Код:
MoveDynamicObject(playerid, SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);  
AttachCameraToDynamicObject(playerid, SnowObject[playerid]);



Re: AttachCameraToDynamicObject bugs/glitches - StRaphael - 18.12.2018

Quote:
Originally Posted by Infin1ty
Посмотреть сообщение
Код:
AttachCameraToDynamicObject(playerid, SnowObject[playerid]); 
MoveDynamicObject(playerid, SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);
Swap these two to become...
Код:
MoveDynamicObject(playerid, SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);  
AttachCameraToDynamicObject(playerid, SnowObject[playerid]);
I already tried this(before to post this)...but doesn't worked...
Any other solution?


Re: AttachCameraToDynamicObject bugs/glitches - StRaphael - 18.12.2018

I tried with normal samp objects functions and work, but with Incognito's streamer...does not work
why?


Re: AttachCameraToDynamicObject bugs/glitches - Threshold - 18.12.2018

Sounds like it could be a streaming issue. Is the object streamed in when you attach the camera to it? Or are you far away from the object when you attach the camera?

I found this conversation from a few years back that explain this issue and some methods to tackle it:
https://github.com/samp-incognito/sa...ugin/issues/49


Re: AttachCameraToDynamicObject bugs/glitches - StRaphael - 18.12.2018

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Sounds like it could be a streaming issue. Is the object streamed in when you attach the camera to it? Or are you far away from the object when you attach the camera?

I found this conversation from a few years back that explain this issue and some methods to tackle it:
https://github.com/samp-incognito/sa...ugin/issues/49
Oh, thanks, I found out how to resolve this problem(setting the stream distance to a negative number).
+rep