Announcement

Collapse
No announcement yet.

3rd Person Camera - Code

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    where's MyPawn.uc? i cant find it.

    Leave a comment:


  • replied
    Hey guys.

    With this camera code I notice that the target point is slightly off from where the bullets actually hit - is there a way to fix this?

    Thanks

    -Ash

    Leave a comment:


  • replied
    I placed your code into the Pawn.ini file of UDK and I get an error saying:

    Error, bad or missing expression in if.

    I replaced the default "simulated function bool CalcCamera" in the code and placed the two var at the bottom of the large var list in the beginning of the code.

    If I placed the two var just above your code like how you placed it, I get an error saying that a var doesn't belong "here".

    What am I doing wrong?

    Leave a comment:


  • replied
    did you follow the Hourences tutorial - if so I am having that exact same problem that when the cinematic sequence ends the 3rd person view returns but the character dissapears and the 1st person arms/cam are shown instead?

    Any help on this matter is appreciated

    **nm just saw galloways code nice 1 gallo

    Leave a comment:


  • replied
    how would you change the distance of the camera for the code?

    Leave a comment:


  • replied
    i got:

    bad or missing expresion: bfixedview, in if

    what does this mean?

    Leave a comment:


  • replied
    iniside, while I think I get what you mean, I was being a bit vague in that post I guess. I tried making a clearer call for help from the community that's gone unanswered here:

    http://forums.epicgames.com/showthread.php?t=715178

    Essentially the same way your code created a Z-axis offset to the camera's point of origin I need to create an X/Y offset. True X is technically depth, but when plugging in various numbers and formulas to the CamStart parameter the X values treat two opposing directions while the Y values treat two other opposing directions that are combined to effectively create the four cardinal directions. In other words, offsetting CamStart.X alone will put the camera way behind or in front of the pawn when facing it's front or back (depending), while doing very little if the pawn's sides are directly in front of the camera. Same goes for the CamStart.Y value. So I'm stuck figuring out some formula to make the CamStart point hold a position relative to a certain side or "face" of a pawn.

    Hope that clears things up a bit. I'm currently using that same methodology of effectively just playing with the numbers to try and hammer something out right now though. I'm trying to move the point about which the camera rotates, which seems to be at least sync'd with CamStart from everything I've experienced.

    Leave a comment:


  • replied
    Is there any way we could make it possible to zoom in and out or atleast make it so the views further back? Also how do I get rid of the camera attachment to the body/gun? whenever i move the mouse the body moves with it is there any way I could get rid of that ? sorry im new to coding haha thanks

    Leave a comment:


  • replied
    Originally posted by Cyber_Bruno View Post
    Nicely done camera, iniside. I've been playing with the code you posted and modifying it some for the sake of seeing what I can do with it, and have to admit it's helped me learn some stuff about the nature of the default camera settings. (I'm a decent coder, but working with vectors and 3D environments is new for me.)
    Something I've been trying to fiddle with, however, would be to produce an offset to the camera's starting position along the horizontal plane. The Z-axis code is already included in the default code (seeing as how your code here takes a lot from the default third person camera setup), but trying to get the formula right for the X/Y axes is proving to be a challenge. In your creation of this code or any of your work so far, have you played with anything along the same lines that you could point me towards? Much appreciated.
    Some advices first:
    Camera have transform pivot (just like object in any 3d app), that you can manipulate it. Diffrence is, that you can't actually see that pivot nor camera.
    Second thing that transform pivot is local and it's relative to camera actuall position.

    Horizontal position is actaully Y. Z is height and X is depth.
    Anyway if you want to simply make offset of where is camera on start, ou simply need to add number to VectorX/Y/Z.

    If you want something like Z-axis for other is not gonna work (at least in that case). To get this forumal working, I just play around with diffrent combinations of functions, compiles > play > see how it work > check something similar with graph drawing progam > change forumal in-code > recompile. Not very effective but actually works :E.

    Leave a comment:


  • replied
    It sounds like you don't have bBehindView = true set in the default properties of your player controller. If you open up the console and enter the command 'BehindView' and it fixes it, that's likely the issue. Otherwise there is probably something wrong in your pawn class.

    Leave a comment:


  • replied
    galloway when i use this code how come its only the gun and the body is invisible?

    Leave a comment:


  • replied
    Originally posted by alvarofer0020 View Post
    hey with this i can make a mirrors edge type of view? becouse i have add my custom gametype and etc but i want to have the first person shooter view but everytime i play the level with my gametype i get the trhidperson view please help
    The way this code works you will be inside the mesh if you try to set up that kind of view, and will just have random bits of occlusion, and that will just look bad.

    I would check out this thread. What they are talking about is currently beyond me, but maybe skipgamer might elaborate on what they have set up if you ask.

    Leave a comment:


  • replied
    hey with this i can make a mirrors edge type of view? becouse i have add my custom gametype and etc but i want to have the first person shooter view but everytime i play the level with my gametype i get the trhidperson view please help

    Leave a comment:


  • replied
    gallo why do i get this error when compiling :

    Error, 'SetBehindView': Bad command or expression

    edit nvm: forgot to set it to class extends utplayercontroller

    Leave a comment:


  • replied
    works perfectly !! you're brilliant! ;] thanks a lot for help!!

    Leave a comment:

Working...
X