Author Topic: ViewSetRotate and ViewSetImage  (Read 1420 times)

Scott

  • Guest
ViewSetRotate and ViewSetImage
« on: June 11, 2012, 07:29:59 am »
Hey,
So, I have a character and I want it to walk in a certain direction. The direction varies according to the angle the player is tilting the device. I am able to get the angle which the character should be walking and then I want to change the image of the view for a walking animation every few times a second. I have stored all the images in an array and have a counter which gets increased every 5 calls and gets reset when at the last image. The problem is that whenever the angle isnt 0, the view does not get set a new image, so it just stays the same image. This is the code I am using:

Code: [Select]
ViewSetRotate(view, angle - 90);
ViewSetImage(view, movingImages[curImage]);

I have also tried setting the image before rotating. Can anyone help here?

Scott
« Last Edit: June 11, 2012, 07:31:31 am by Scott »

tim

  • Administrator
  • Hero Member
  • *****
  • Posts: 1595
  • Karma: +11/-1
    • View Profile
    • DragonFireSDK
Re: ViewSetRotate and ViewSetImage
« Reply #1 on: June 11, 2012, 08:35:31 am »
Calling ViewSetRotate() after ViewSetImage() should work, regardless of the angle.  Since you only show the two lines of code, can you send me a sample with a little more information so I can see better what the issue might be?

Thanks,
Tim Sommers
DragonFireSDK Team

Scott

  • Guest
Re: ViewSetRotate and ViewSetImage
« Reply #2 on: June 11, 2012, 09:58:25 am »
PM'd

Scott

  • Guest
Re: ViewSetRotate and ViewSetImage
« Reply #3 on: June 12, 2012, 06:24:50 am »
Well, it seems to be alright on my iPhone, just not in windows :L