Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rotate an entity to face another entity
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#1
Rotate an entity to face another entity

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.
(This post was last modified: 10-13-2015, 08:50 PM by Abion47.)
10-13-2015, 02:13 PM
Find
A.M Team Offline
Banned

Posts: 811
Threads: 63
Joined: Sep 2014
#2
RE: Rotate an entity to face another entity

[Image: 5eGaCYS.png]
10-13-2015, 06:43 PM
Find
TiManGames Offline
Senior Member

Posts: 517
Threads: 25
Joined: May 2015
Reputation: 11
#3
RE: Rotate an entity to face another entity

(10-13-2015, 06:43 PM)TheDoctorPoo Wrote: [Image: 5eGaCYS.png]

[Image: CRayS3a.gif]

This forum is dead
10-13-2015, 06:47 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#4
RE: Rotate an entity to face another entity

(10-13-2015, 06:43 PM)TheDoctorPoo Wrote: [Image: 5eGaCYS.png]

I guess it's my fault for not clarifying, I meant how to achieve this rotation in code.
10-13-2015, 08:48 PM
Find
WALP Offline
Posting Freak

Posts: 1,221
Threads: 34
Joined: Aug 2012
Reputation: 45
#5
RE: Rotate an entity to face another entity

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.
10-13-2015, 11:21 PM
Find
Abion47 Offline
Senior Member

Posts: 369
Threads: 22
Joined: Oct 2015
Reputation: 46
#6
RE: Rotate an entity to face another entity

(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.
10-14-2015, 05:36 AM
Find




Users browsing this thread: 1 Guest(s)