Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Commands->Set_Facing
Re: Commands->Set_Facing [message #429295 is a reply to message #429115] Tue, 25 May 2010 06:19 Go to previous message
Jerad2142 is currently offline  Jerad2142
Messages: 3812
Registered: July 2006
Location: USA
Karma:
General (3 Stars)
Set_Facing works on all human and vehicle objects except for infantry that are controlled by the player, which it still works for, the players camera just instantly override the Set_Facing command, rotating the player's character back to what their camera is facing.

float PI = 3.14159265f,Facing = 90.0f;
Vector3 pos = Commands->Get_Bone_Position(obj,"c head");
pos.X += 20.0f*(cos(Facing*PI/180));
pos.Y += 20.0f*(sin(Facing*PI/180));
Force_Camera_Look_Player(obj,pos);


 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Flag w3d
Next Topic: Renegade beta vid?
Goto Forum:
  


Current Time: Wed Dec 18 09:45:53 MST 2024

Total time taken to generate the page: 0.00939 seconds