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

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.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)