|
Well I added the script Smooth Follow, my camera to follow my character, because the problem is that there are some movements that I do with my character, the camera passes through leaving the ground to see what is inside. I would like to fix it so that when she turned the camera crash into the ground without the cross and did not cease to focus on character Thx in Advance
(comments are locked)
|
|
One trivial addition to this could be to raycast to the next camera position. If the raycast hit anything, limit the movement to the hit position, and perhaps subtract some length yet to avoid the camera being "exactly on" the ground. I don't have unity installed at the moment so I can't verify this code would work but basically you'd have two points. One represents the current location and the other represents the next location (that the camera wants to go to); I have also been struggling with this. If you could give a small example as to how you would implement this (not asking you to write it all out course, just giving me an idea of how I would write that). I'd of course be for ever thankful. :-)
Feb 23 '11 at 12:41 PM
Joshua
Added some code that could illustrate this.
Feb 24 '11 at 02:44 AM
Statement ♦♦
Thanks, I'll try your example
Feb 24 '11 at 10:58 AM
Unamine
(comments are locked)
|
