client
SetEntityHeading
FiveM client native documentation with a Lua example.
Summary
Sets which direction an entity faces (0-360 degrees). Used after teleporting or spawning to orient peds and vehicles correctly.
Returns
void
Parameters
entitynumberThe entity handle.headingfloatThe heading in degrees (0-360).Example
SetEntityHeading(PlayerPedId(), 90.0)Common pitfalls
- Heading wraps at 360; values outside 0-360 are normalized.
- Set heading when teleporting so the player doesn't face a wall.
Related natives
Related guides
Need protected areas on your map?
Viper Safe-Zone draws polygon safe zones in-game — no hand-edited coordinates — with weapon, combat and vehicle-speed rules per zone.
See Viper Safe-Zone →