Rotate an entity to face another entity - Printable Version +- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum) +-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html) +--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html) +---- Forum: Technical Support (https://www.frictionalgames.com/forum/forum-80.html) +---- Thread: Rotate an entity to face another entity (/thread-31307.html) |
Rotate an entity to face another entity - Abion47 - 10-13-2015 More or less what the title says. The Camera object has a built in "RotateTo" function, but I can't find anything for general entity use, and I'm not sure how to go about using the matrices route. EDIT: What I mean by this is how to rotate an object to face another object in code. RE: Rotate an entity to face another entity - A.M Team - 10-13-2015 RE: Rotate an entity to face another entity - TiManGames - 10-13-2015 (10-13-2015, 06:43 PM)TheDoctorPoo Wrote: RE: Rotate an entity to face another entity - Abion47 - 10-13-2015 (10-13-2015, 06:43 PM)TheDoctorPoo Wrote: I guess it's my fault for not clarifying, I meant how to achieve this rotation in code. RE: Rotate an entity to face another entity - WALP - 10-13-2015 CharMover_TurnToEntity() seems to be capable of making a character face an entity. It might be possible to trick the game into thinking your entity is character. I dont know if this function requires any additional helper files, as I have never used it before. RE: Rotate an entity to face another entity - Abion47 - 10-14-2015 (10-13-2015, 11:21 PM)The Mug Wrote: CharMover_TurnToEntity() seems to be capable of making a character face an entity. It might be possible to trick the game into thinking your entity is character. I dont know if this function requires any additional helper files, as I have never used it before. Looking through the hpc_api, it does seem like there might be a couple ways to trick the CharMover_TurnToEntity function (or perhaps more useful to this particular application, the CharMover_TurnInstantlyToEntity function) into using non-character entities, but this does seem like an odd absence for the API to have. I'll have to give it a test when I get a second at some point. |