Quantcast

Jump to content

» «
Photo

[c#] Spawned Ped face same direction as Player when isStopped

2 replies to this topic
decoy1212
  • decoy1212

    Better Late Than Never But Never Late Is Better

  • Members
  • Joined: 01 Oct 2015
  • South-Africa

#1

Posted 4 weeks ago

Hi. Can anyone please assist with TASK_TURN_PED_TO_FACE_ENTITY or face COORD or something i might have missed. Idea is to get the spawned ped to face the same direction as Player.


LeeC2202
  • LeeC2202

    Snitch

  • Members
  • Joined: 24 Oct 2015
  • United-Kingdom

#2

Posted 4 weeks ago Edited by LeeC2202, 4 weeks ago.

Have you tried setting the Rotation value of the Ped, to the same as the player?

SpawnedPed.Rotation = Game.Player.Character.Rotation;

decoy1212
  • decoy1212

    Better Late Than Never But Never Late Is Better

  • Members
  • Joined: 01 Oct 2015
  • South-Africa

#3

Posted 3 weeks ago

Thank you Lee. "Looks" like i wasnt aware of the ".Rotation". It does do exactly that. But the Ped rotation transition is not impressive. So i opted for TASK_FOLLOW_TO_OFFSET_OF_ENTITY. atleast this way the Ped is closer and mostly  faces the same direction as Player.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users