Mr T, do you know how to ask the accelerometer which way the device is oriented? Like a rule based on when it is in portrait mode and another rule if it is landscape?
I think I have the general idea. The values are the strength of gravity along each axis. I thought the values were the point the objects were pulled to
Here's how it works. (Mr. Rinoy is pretty much correct) The way that it used to be was you set the gravity to a scene to some value and it pulls everything downwards if that number was greater than zero and upwards if that number was less than 0. Now with the changes in 0.8.6, that old gravity in previous versions is now just called the Y scalar value of the gravity, and the new X scalar value is introduced to allow a gravity source to pull along the X axis with a positive X gravity pulling things left.
You could make a game that could be played in both orientations, instead of rules in every actor for gravity, just have a switch if in portrait or landscape.
Hmm, or a maze puzzle. Like those little cheap plastic toys w/ the small ball that you roll around. I'll have to try that... there's enough labyrinth games but I don't know of one like that.
EDIT: Ok, nevermind... I looked and there are. Not too many though.
Does this change affect the previous games use of gravity?
I'm about to do an update on my first game that uses gravity in a lot of scenes, will I have to do any adjustments to all those scenes if I update to .8.6?
CodeMonkey said: Now with the changes in 0.8.6, that old gravity in previous versions is now just called the Y scalar value of the gravity, and the new X scalar value is introduced to allow a gravity source to pull along the X axis with a positive X gravity pulling things left.
So 0.8.5 gravity values should just be in the Y gravity and it should be translated for you with the new version. As usual, make a copy for safe keeping somewhere.
Comments
The way that it used to be was you set the gravity to a scene to some value and it pulls everything downwards if that number was greater than zero and upwards if that number was less than 0.
Now with the changes in 0.8.6, that old gravity in previous versions is now just called the Y scalar value of the gravity, and the new X scalar value is introduced to allow a gravity source to pull along the X axis with a positive X gravity pulling things left.
Can someone think of an example where X gravity makes sense?
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
Send and Receive Data using your own Server Tutorial! | Vote for A Long Way Home on Steam Greenlight! | Ten Years Left
EDIT: Ok, nevermind... I looked and there are. Not too many though.
I'm about to do an update on my first game that uses gravity in a lot of scenes, will I have to do any adjustments to all those scenes if I update to .8.6?