Update issue

just updated to unity iphone 1.5
and now my charector is rotated 90 degrees anybody els e having the same problem but more importantly anybody know how to fix the problem sure Its something simple…

you could apply an Transform.Rotate(-90, 0, 0) to the desired rotation, hard to say without looking at it in engine.

cheers for the responce but thinking it has something to do with the new orientation features …

this is the script I’M using to control my main charector if any body could point out why there is now a issue since I updated I would be gratefull…

var turnSpeed : float = 10.0;
var maxTurnLean : float = 50.0;
var maxTilt : float = 50.0;

var sensitivity : float = 10.0;

var forwardForce : float = 1.0;
//test//var guiSpeedElement : Transform;

private var normalizedSpeed : float = 0.2;
private var euler : Vector3 = Vector3.zero;

var horizontalOrientation : boolean = true;

function Awake () {
	if (horizontalOrientation)
		Screen.SetResolution(480, 320, true);
	else
		Screen.SetResolution(320, 480, true);

	//test//guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
}

function Update () {
	for (var evt : iPhoneTouch in iPhoneInput.touches)
	{
		if (evt.phase == iPhoneTouchPhase.Moved)
				{
			//test//normalizedSpeed = evt.position.y / Screen.height;
			//test//guiSpeedElement.position = new Vector3 (0, normalizedSpeed, 0);
		}
	}
}


function FixedUpdate () {
	rigidbody.AddRelativeForce(0, 0, normalizedSpeed * forwardForce);
	
	var accelerator : Vector3 = iPhoneInput.acceleration;

	if (horizontalOrientation)
	{
		var t : float = accelerator.x;
		accelerator.x = -accelerator.y;
		accelerator.y = t;
	}
	
	// Rotate turn based on acceleration		
	euler.y += accelerator.x * turnSpeed;
	// Since we set absolute lean position, do some extra smoothing on it
	euler.x = Mathf.Lerp(euler.x, -accelerator.x * maxTurnLean, 0.2);//euler original setting z

	// Since we set absolute lean position, do some extra smoothing on it
	euler.x = Mathf.Lerp(euler.x, accelerator.y * maxTilt, 0.2);
	
	// Apply rotation and apply some smoothing
	var rot : Quaternion = Quaternion.Euler(euler);
	transform.rotation = Quaternion.Lerp (transform.rotation, rot, sensitivity);
}

also since the update some of my animations are not triggering…am I the only one who has been jinxed by the new and I am sure fabulous update… :wink:

Yeah I had the 90 degree rotation issue, but only once an animation was playing…

Actualy, it happened to about 5 objects once, so I shoved them all in as children of an empty object and the first time an anim is triggered, it rotates 90 degrees.

I’m sure the model just needed to be reimported or something, but I was too lazy :slight_smile:

cheers for the response…my project is in the final stages don’t want to start messing with things at this late stage was hopeing there was a magic butting fix … if not will have to sadly stick with 1.3 until after the release… :cry:

the FBX importer was updated from the stoneage 2006.x one to the 2009.x one

Chances are good that a reimport actually fixes it, so does going back to Unity iPhone 1.0.x to finish the project and switch to 1.5 for the next one if you don’t want to update your project to 1.5. Its not common practice to ugprade technology with a near finished project actually for exactly such reasons …

yeah I know…upgradeing at such a late stage was not my finest decision…but all those new features damn pushed me over the edge! anyway just reverted back to 1.3 and everything works fine now… :wink: