x


Rotating FPC Causes Player To Pass Through Surfaces

Howdy all, I'm creating a game where at certain points the First Person Controller is animated to tip forwards and backwards, this creates an odd tilting camera effect as the player changes direction to give the feeling their guy is leaning through injury.

I've done this by animating a cube to tip and made it a parent object of my FPC (maybe an odd way of doing it but it was the only way I could get it so the FPC would still function correctly).

My problem is that as this happens the FPC will pass through the floor or wall if the player is very close to one.

Is there a method such as altering the FPC, change my animation technique etc that would stop this from happening. (Note: I can't just turn gravity off as there are points where my the character will fall).

Any ideas will be greatly appreciated. Many thanks, Will.

more ▼

asked Apr 28 '10 at 10:41 AM

Will 1 gravatar image

Will 1
77 9 9 10

(comments are locked)
10|3000 characters needed characters left

2 answers: sort voted first

Having a CharacterController as a child to something else that moves is never a good idea since the physics engine won't be able to detect the collisions.

I suggest you find another approach - for example you could animate only the camera to get the tilting effect you want, while you leave the game object with the CharacterController alone.

more ▼

answered Apr 28 '10 at 11:33 AM

runevision gravatar image

runevision ♦♦
8.1k 29 46 112

(comments are locked)
10|3000 characters needed characters left

Thanks for the input Rune but tilting the camera wouldn't achieve the effect that I was after.

I ended up simply animating the cube to lift up and move in the opposite direction of each tilt. Now no matter how the player is moving they won't breach the floor or a wall. Thankfully it works a treat.

Many thanks, Will.

P.S Great work on the Locomotion system, I will no doubt use it one day!

more ▼

answered Apr 28 '10 at 01:32 PM

Will 1 gravatar image

Will 1
77 9 9 10

(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x3807
x3015
x1882
x464

asked: Apr 28 '10 at 10:41 AM

Seen: 1103 times

Last Updated: Apr 28 '10 at 10:41 AM