ShiVa Developer Forum • View topic - Weird rotation issue
 

Weird rotation issue  [SOLVED]

All about the StoneScript

Weird rotation issue

Postby tacroy » 2013-09-30 18:59

So I use code to rotate an object after it has been loaded. And it was working perfectly, for a while in my published app. However now something odd is happening.
It is showing rotated correctly in the editor, but when I test publish out to my iphone4 two of my six objects are rotated...wrongly.

I haven't touched this code at all, and the only real changes I made was re-exporting and starting on doing the hotfix.

Any ideas?

Code: Select all
   if (diceSideType == "d6") then
             --   object.setRotation ( hObject,30,30,90,object.kGlobalSpace)
                object.setRotation ( hObject, 100 , 90, 0, object.kGlobalSpace )
            elseif (diceSideType == "d8")  then
                object.setRotation ( hObject, -60 , -50, 180, object.kGlobalSpace )
            elseif (diceSideType == "d10")  then
                object.setRotation ( hObject, 120 , -270, 360, object.kGlobalSpace )
            elseif (diceSideType == "d10tens")  then
                object.setRotation ( hObject, 120 , -270, 360, object.kGlobalSpace )
            end
           
tacroy
Gold Boarder
Gold Boarder
 
Posts: 187
Joined: 2011-05-31 19:16

Re: Weird rotation issue

Postby dwilki » 2013-10-01 07:49

Are you using the beta?
dwilki
Expert Boarder
Expert Boarder
 
Posts: 105
Joined: 2008-07-16 20:57

Re: Weird rotation issue

Postby tacroy » 2013-10-02 01:37

I'm using Editor 1.9.1.0, and just exporting it and moving the .stk into the build folder of the xcode project.
tacroy
Gold Boarder
Gold Boarder
 
Posts: 187
Joined: 2011-05-31 19:16

Re: Weird rotation issue  [SOLVED]

Postby Badger » 2013-10-02 02:12

The xcode project must have been built with one of the newer betas since the rotation update. I have found the editor version doesn't matter in this case.

The best advice I can give you is to get the latest beta editor, make sure it all works fine in there, and then build that. It may be best to re-author a new project in the latest UAT beta also.

The latest beta editor should replicate the rotation problem when you run the game.

I have just gone through a similar situation working in 1.9.1 and authoring through mac UAT b10(?). If you haven't used a beta editor before, make sure to back up your project as the current beta makes games non-backwards compatible with 1.9.1.
________________________________
˙ןǝnuɐɯɯǝ osןɐ ɯ,ı
User avatar
Badger
Gold Boarder
Gold Boarder
 
Posts: 198
Joined: 2012-05-11 08:42
Location: Australia

Re: Weird rotation issue

Postby tacroy » 2013-10-02 14:00

So. Very odd. I pulled down the beta last night and it WAS represented in the editor, just like you said. Whats weird to me is that I hadn't had the new editor before. Would updating xcode have done it? That seems odd.

Anyway, I got the beta, calculated new starting rotations, and it all seems good!
Thanks!
tacroy
Gold Boarder
Gold Boarder
 
Posts: 187
Joined: 2011-05-31 19:16

Re: Weird rotation issue

Postby Hamungousaur » 2013-10-02 15:43

It happen with my game too
In Shiva 1.9.1 working good,
but in beta 1.9.2 or Uat beta I have rotation problems
Hamungousaur
Junior Boarder
Junior Boarder
 
Posts: 29
Joined: 2012-12-24 16:18

Re: Weird rotation issue

Postby cotwild » 2014-11-11 23:07

I created a project almost a year ago and now installed Version 1.9.2 (paid 3D development version) and got also those rotation problem. does anyone have a solution for this?

Code: Select all
object.setRotation ( hObject,90,0,180,0 )
cotwild
Fresh Boarder
Fresh Boarder
 
Posts: 5
Joined: 2013-03-29 19:55

Re: Weird rotation issue

Postby dwilki » 2014-11-12 00:11

I think this was actually a fix. Just fiddle around with your y, p, r values until the rotation is correct. No other fix I'm aware of.
dwilki
Expert Boarder
Expert Boarder
 
Posts: 105
Joined: 2008-07-16 20:57

Re: Weird rotation issue

Postby Deimitri » 2019-03-01 13:42

it happen with my game too
Deimitri
Fresh Boarder
Fresh Boarder
 
Posts: 1
Joined: 2019-03-01 13:39


Return to Game programming

Who is online

Users browsing this forum: No registered users and 9 guests

cron