About Store Forum Documentation Contact



Post Reply 
Direction
Author Message
Jetro Offline
Member

Post: #1
Direction
how to make sure that the character was directed toward the cursor like a Top Down Shooter?
(This post was last modified: 05-01-2011 05:57 AM by Jetro.)
05-01-2011 05:57 AM
Find all posts by this user Quote this message in a reply
Driklyn Offline
Member

Post: #2
RE: Direction
Like in "EsenthelEngineSDK\Tutorials\Source\Advanced\4 - Demos, Game Basics\Game Basics\07 - Doors.cpp" ?
(This post was last modified: 05-01-2011 06:26 AM by Driklyn.)
05-01-2011 06:25 AM
Find all posts by this user Quote this message in a reply
Jetro Offline
Member

Post: #3
RE: Direction
In this example, the character goes in the direction of the cursor and I need to, he just turned in the direction of the cursor.
05-01-2011 06:52 AM
Find all posts by this user Quote this message in a reply
Dampire Offline
Member

Post: #4
RE: Direction
Code:
Flt angle_delta = AngleDelta(Chrs[0].angle.x+PI_2, Angle(phys_hit.plane.pos.xz() - Chrs[0].pos().xz())),
max_frame_delta=Time.d()*DegToRad(600);

Clamp(angle_delta, -max_frame_delta, max_frame_delta);
Chrs[0].angle.x += angle_delta;
05-01-2011 08:02 AM
Find all posts by this user Quote this message in a reply
Jetro Offline
Member

Post: #5
RE: Direction
Thank You!!!
05-01-2011 10:04 AM
Find all posts by this user Quote this message in a reply
Post Reply