# Celestial Sphere

Hey everyone,

I am currently re-doing a game project gtjuggler and I (and a friend named Owen) did a year and a half ago. It’s called Celestial Sphere and we developed it in the C4 Engine, which is a great engine but I find Unity to be better for developing games with small teams.

The game is mostly about 3D platforming with a sphere and adjusting to changing gravity throughout the level. Right now you simply collect enough coins to pass the levels but I also want to re-design the core concept a bit. Before getting to that though, I’m just making sure I can do everything we did in the C4 Engine in Unity.

Here’s is a link to the first prototype level of the game. There is no objective right now, but this is for testing camera, movement, and physics.

I actually have a couple of questions that some of you might be able to answer once you’ve played around in the level a bit. The moving block on the first floor is a Kinematic rigidbody, and I directly manipulate the rigidbody’s position to create its animation (that’s the correct way to do it for kinematic bodies right?). However, when the player sphere and the moving block collide, it doesn’t seem realistic, it just seems to displace the sphere until they’re no longer colliding but it doesn’t apply any force to it. Any ideas on this?

Also, to get the camera to sorta work with all gravity vectors (as of now, without collisions) what I did was to strip down the Smooth Follow script (removed the smoothing for now) and do the positioning of the camera for the default gravity and then rotate the position using RotateAround to match the current gravity vector. I’m not very good at Vector math so this was the easiest way I could think of doing it after tearing out my hair for 2 days. Any suggestions on making this less hacky would be appreciated.

Thanks fellas.

A few things!

In the 3rd person platformer tutorial (on the unity site under support) there are multiple camera scripts which will stop the camera form cutting in to the world.

Also: Have you tried adding mass to the moving obstacle that might help?!?

great game![/code]

Thanks for the suggestion Alec. I have been looking at the 3rd person platformer tutorial code and I think it’ll definitely help me with camera collisions.

Also, regarding the moving block, I did add mass to it but it didn’t change anything. It seems that the block is not applying any physics force to the sphere but I don’t know why!

I’ve worked on the camera a bit more today. Added the following:
-Camera height smoothing (you can notice this when going up and down ramps)
-Camera rotation smoothing (just a tiny bit to make the camera rotations more elegant, but not so much that it frustrates the player, hopefully)
-Gravity change smoothing. (gravity change itself is actually instant but the observed gravity by the camera is now Slerp-ed)

Here’s the link to the new version:

However, I had one more problem come up. When the gravity change is from -y to y (meaning that the angle between the new and the old gravity vector is 180), Slerp doesn’t travel towards the new vector in the direction I want, which I’m not too frustrated with since it makes sense that it could go either way with the angle being 180. I can’t seem to find a way to get it to go the other way though. Any help on this would be appreciated. (You can notice this issue when you touch the 4th gravity platform.)

Thanks.

Moar updayts: (LOLcat version)

Exizting problemz:
-Gravty rotashunz still an ishue
-Mooving block still an ishue

k thnx, bai!

can has sum monez plox?

does me see a top ten iphone game here?!

Mommy mommy! Why are the people here so bad at spelling?

Mom: That’s because they’re pretending to be retards!

Hey Unity Community! Whoo rhyming

So I was the other developer on Celestial Sphere back when we made it in the C4 engine. I unfortunately did almost none of the coding, but focused on level design and some art assets and general game design.

I hope to contribute somehow to this Unity version in the future. But now its a one man Yilmaz show! Go go gadget!