- Home /
Is a Rotating World fesable
Alright so quick question i was wondering if it would be fesable to have my main character go around the sides of a cube. The problems ive had so far are global axis becuase when your on a side up is the z instead of the y etc. Basically what i was wondering is can this be done and if so could you point me in the right direction
Thanks Mike
remember if you rotate your world then nothing in that rotated world can be statically batched.
Answer by Jean-Fabre · May 12, 2011 at 05:40 AM
Hi,
If you add an empty gameObject acting as the root of all your models you want to rotate, then, it's trivial. That is, in the hierarchy view, you have only one gameObject at the top level, the rest is parented to it. Rotate this, and Everything will follow. If you want more granular control, make as much root level as you need ( one for the world, one for the player, etc etc).
Bye,
Jean
I really like that idea, but would it make the player look like is rotating or the world?
well, that all depends on how you have your camera set and how you have your character setup, but if the camera and the player is not linked to that world root you are rotating, then yes ( provided your character will support a moving rotating ground which it should).
Perfect I actually made a 90 degree rotation animation and used that along with an empty that the player is parented to and it works awesome! Thank you sooo much.
Answer by lil_billy · May 12, 2011 at 03:07 AM
yes it can be done if: you are prepared to a F***ton of programming you are good with mathematical physics (and are prepared to write physics calculations in code)
after that yes
depending on what you are looking for, one possible way to greatly reduce your work load is to use constant forces that will always push towards the cube (that will hopefully override the effect of world gravity else you will have to turn it off and then do a bunch of things)
next you could use some trickery to have the lookat function to orient your character so that his feet are always pointing towards the ground (this WILL not resolve any physics issues)
i had a friend who did this with spheres easily enough (cubes are bound to be much harder) because the orientation will be sudden
next there is always my favorite perspective and that is what you see and what the player sees can be COMPLETELY different in your case you could make it appear that the player is orbiting the cube but in reality the world is rotating for the player (i promise this will be alot less punishing than having to write your own physics system)
Alright thanks I will try some of that. I'm not worried too much about the physics aspect of this because it is not important to my game. Also I though of rotating the world to make it seem like the character rotated, but if you rotate a cube the corner becomes higher than the players position.