Going Upside down

Hey guys, I’m trying to edit the FPS controller script to do some simple tests, as the level you are on is rotating horizontally 360 degrees with the level going upside down. The player falls off the map.

Any simple solution?

Any help is greatly appreciated.

Thanks

Jon

Rotate/move the level around the player instead?

Sorry I didnt explain my self very clear

My bad :confused:

Im running just some simple tests, the player is still using the default FPS Prefab that comes with Unity.

The level is rotating 360 degrees around the player, atm its just a square box.

You can jump to the sides while its rotating.

But if you leave the character still. It will Fall through the floor as it collides with a new side of the box.

I am confused. Is it like mario galaxy or something?

Nah, I wish it was :stuck_out_tongue:

Think 3rd person. Think of the whole level spinning 360 degrees around, 50% through the animation the player is standing and running across the roof.

but atm you can only jump from wall to wall, you cant stand still and let gravity take you.

I will upload a video tomorrow morning to explain my point further.

Hey guys, Ive videoed my problem so u guys get a better understanding :slight_smile:

http://www.vimeo.com/14701337

Any help would be greatly appreciated.

Thanks a lot

Jon

OK, I watched it a few times and this is my thought.

The CharacterController is checking collisions each frame, yet when the outside is rotating as well. When it rotates, it rotates up, past the bottom of the CharacterController, so the collision is not longer registered as being on the bottom and gravity is then applied (from the script, not Physics.Gravity).

This looks similar to the elevator probably many people have, “Why does my player fall through the elevator!” The answer is usually that the player didn’t fall through the elevator so much as the elevator went up through the player, then the player fell down because they no longer had a collision from below.

Ahh awesome, Thanks for your insight.

I did have a thought it was that, and when I jump it was resetting the script to find the new floor and roof.

Any script to counter-act this to make it work?

Any help would be much appreciated :smile:

Thanks

Look up some of the posts about elevators and give them a try. Basically, the character should be parented to the floor in many elevator implementations. Perhaps a downward raycast to find what is below it and parent it to that in a fashion similar to the elevator implementations, but without the collision zone that marks the elevator area.

Thanks a lot!

Helped a lot, gonna give it a try and see if it works.

Gonna research the elevators, but as I said i’m no programmer but gonna give it my best shot :slight_smile:

If anyone has had this problem and had fixed it, post what you did please :slight_smile:

Thanks a lot

Jon

This is the first I saw of this in Unity, but it reminds me of an old Playstation game called “Blast Chamber”.

Its mostly for my new game project coming up.

Was doing some early tests :slight_smile:

I remember that game, renting it from a game store :stuck_out_tongue:

Well, don’t age yourself there, Pops. :wink:

I remember the good old N64 :wink:

Starfox.

Anyone got a solution to this? :frowning:

I thought about it some more and realized that parenting wouldn’t work well, because it would move the player in an unnatural way.

The solution might be that you have to ditch the built-in scripts and do something entirely from scratch. You could use the character collider still for the data it brings you, but probably should avoid using the scripted gravity-like movement it provides.

Tried parenting it didnt really work v.well :stuck_out_tongue:

Yeh, gonna pay a scripter to do a whole new script for our project :slight_smile:

Well. Going back to the raycasting business, it might be OK to make sure that the player cannot go lower than the point at which a hit occurred directly below them. The scripted gravity probably doesn’t account for that very well. Also, with clever use of LateUpdate, you could force some order into the updates.

This is really a tough and interesting challenge.

idd.

Gonna research a bit more and ask a few programmers :slight_smile:

Thanks for the help

:smile: