Attach Object Rotation Vehicle
#1

https://www.youtube.com/watch?v=ZZ-C_9autXg
So I saw this video of AbyssMorgan
I look at his code and do not know
Why do this, please help me
Code :
PHP код:
stock CompRotationFloat(Float:rotation,&Float:cr){ 
    
cr rotation
    while(
cr 0.0cr += 360.0
    while(
cr >= 360.0cr -= 360.0

PHP код:
new Float:angle,Float:vax,Float:va;
    
GetVehicleZAngle(GetPlayerVehicleID(playerid), va);
    
GetPlayerCameraZAngle(playerid,angle);
    
CompRotationFloat(angle-va+90,vax);
    
AttachDynamicObjectToVehicle(alobj,GetPlayerVehicleID(playerid),0.0,0.0,0.1,0.0,0.0,vax); 
Why we need angle-va+90?
Reply
#2

bump
Reply
#3

help me
Reply
#4



CompRotationFloat - Compress rotation to value in range <0.0:360.0)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)