Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: 2D sprite turning animations  (Read 1576 times)

0 Members and 1 Guest are viewing this topic.

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
2D sprite turning animations
« on: September 20, 2006, 11:19:40 AM »

Hi all,
        I have a 2D actor sprite that walks in the normal 8 directions.
Is it possible for the actor to turn correctly in relation to where the player clicked on the screen?

For example: - Actor is facing downwards, player clicks to the right and the actor turns to the right using a smooth turning animation.

Also if Actor facing downwards, player clicks UP the actor smoothly turns on the spot upwards.


Is this just a case of : -

of just adding TURN_UP,TURN_DOWN,TURN_UPRIGHT etc etc??

or am I barking up the wrong tree??





Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5677
    • View Profile
    • Dead:Code Site
Re: 2D sprite turning animations
« Reply #1 on: September 20, 2006, 04:59:45 PM »

Well the actor should do just that, providing the TURN_LEFT and TURN_RIGHT animations are defined. Perhaps the names are a little misleading, more suitable names would be "turn clockwise" and "turn counter clockwise".
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

SBOVIS

  • Frequent poster
  • ****
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 404
  • FORGET REALITY SURRENDER TO YOUR DARKEST DREAMS
    • View Profile
    • LIMBO of the LOST
Re: 2D sprite turning animations
« Reply #2 on: September 20, 2006, 05:09:49 PM »

Ahhhhhh I see, so the animations below TURN_LEFT are the sprite positions for the actor at those points from clockwise motion.
TURN_RIGHT are sprite positions for the actor from anti-clockwise.

OK got it, at the moment I just have one frame in the sprite files and the main actor turns a little sharp and quickly, If I add more frames this will smooth this out I take it.
Logged
kind Regards
Steve Bovis
MAJESTIC STUDIOS
 

Page created in 0.169 seconds with 22 queries.