Welcome to Dream.In.Code
Getting Help is Easy!

Join 136,508 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,703 people online right now. Registration is fast and FREE... Join Now!




Rotate on Hittest?

 
Reply to this topicStart new topic

Rotate on Hittest?

cadeownz
16 Aug, 2008 - 12:08 AM
Post #1

New D.I.C Head
*

Joined: 11 Jul, 2008
Posts: 31

Hey,
is it possible to make it rotate and move in direction it faces through a hittest?
User is offlineProfile CardPM
+Quote Post

BetaWar
RE: Rotate On Hittest?
16 Aug, 2008 - 06:45 AM
Post #2

#include <soul.h>
Group Icon

Joined: 7 Sep, 2006
Posts: 2,026



Thanked: 81 times
Dream Kudos: 1175
My Contributions
Yes, you just have to check for the hits, then rotate on hit whichever way you want then use tan/sin/cos to get the angle and give it an amount it is allowed to move (in pixels) and calculate how far on the x/y graph ist needs to move to get the amount in a certain direction.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 08:42PM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month