How to change camera angle while it's attached to an object?
#5

Quote:
Originally Posted by Threshold
Посмотреть сообщение
You're changing the camera's LookAt before you even attach the camera. Try this:
PHP код:
CMD:objtest(playerid)
{
    new
        
Float:coordsfrom[3] = {2056.173828794.06402535.411571},
        
Float:coordsto[3] = {2055.5297851132.96606440.313831}
    ;
    
TogglePlayerControllable(playerid0);
    
SnowObject[playerid] = CreateDynamicObject(18864coordsfrom[0], coordsfrom[1], coordsfrom[2], 000, -1, -1, -1, -1);
    
AttachCameraToDynamicObject(playeridSnowObject[playerid]);
    
MoveDynamicObject(SnowObject[playerid], coordsto[0], coordsto[1], coordsto[2], 19);
    
SetPlayerCameraLookAt(playeridcoordsto[0], coordsto[1], coordsto[2]);
    return 
1;

If this just results in your camera looking down or something similar, you might have to use a CAMERA_MOVE as a cut:
PHP код:
SetPlayerCameraLookAt(playeridcoordsto[0], coordsto[1], coordsto[2], CAMERA_MOVE); 
Or alternatively look at InterpolateCameraLookAt.
It tried this command and this happens : https://www.youtube.com/watch?v=B1YhQOQvCQs
It's weird becouse it sets the camera on different position than player is, and the camera is no longer attached to the object.
Why? Any solution?
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)