Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice
  3. Dismiss Notice

WOW Camera Movement

Discussion in 'Scripting' started by matrix211v1, Jan 20, 2009.

  1. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    I believe that what you are trying to accomplish for 1 does not need an advanced camera controller such as the WoW camera controller, and for 2 needs to be in it's own topic, rather than this one.

    That being said, your game propels your character down a tube, is it like a space ship which cannot go away from the bounds? - or - like a hover racing game where you spin around the tube at high velocity? (are you clamped to the tube?)

    It appears that your camera is clipping the tube to see the outside world. One very simple way to fix this is to change the near clipping plane of the camera to like 0.01 or so. This should fix it.
     
  2. saito0892

    saito0892

    Joined:
    Jan 4, 2014
    Posts:
    3
    Thanks for your answer bigmisterb.

    About your question, my game propels my character down the tube and the camera is attached to the character.

    Actually I'm using a camera with a near clipping plane set to min value (0.01) and I still have the same problem.

    I forgot this in the first post (sorry) but the tube is not always "straight", there are some curves and when the character is approaching to a curve is more likely to happen the problem with the camera.

    PD: I will post this problem in it's own topic as you recommended.

    Thank you.
     
  3. bigmisterb

    bigmisterb

    Joined:
    Nov 6, 2010
    Posts:
    4,221
    The problem that you have is that your using a fixed distance camera as a trailer, you need to use a sled camera that sits off the surface of the tube and is more elevated then any obstacles in the tube.

    Q: do you have something that tells what angle the ship is inside the tube at any point in time? If so, you could use that to calculate where the camera should be.

    Other than that, I would simply raise the up on the model. I assume the camera tilts with the direction of the tube. It's probably a simple camera to set up though.
     
  4. saito0892

    saito0892

    Joined:
    Jan 4, 2014
    Posts:
    3
    Thanks for your advice bigmisterb.

    I'm trying with this approach right now and I think it will be a good solution combined with a minimal and necessary near clipping plane and far clipping plane.
     
  5. paulus51

    paulus51

    Joined:
    Dec 5, 2012
    Posts:
    33
    i sincelry hope that some one got a real working WOW mouse camera script, i have used over and over again to get this working like in mmo world of warcraft , spend days on forums and try out alot of scripts none of them work properly as it should work like in WOW,
    some scripts i even can walk backwards

    for those who dont know how that works in WOW :

    mouse : right click is rotate horizontal and vertical ( up and down )
    mouse: left click is rotate horizontal and vertical ( up and down)

    camera is behind target

    then wen you click both mouse buttons down, character moves forwards, same working WASD keys .

    mouse is always on screen :visible, becouse you can take over walking /running with the WASD keys en point your mouse on the casting bar spells ect ect,

    numlock key is used for toggle walking / running and auto walk

    interacting with NPC is right mouse button but thats not for this script ;-)


    ***** zoom in your characters face tutorial *******************************


    to make the camera zoom in you face and not above your character :

    [1] go to edit / project settings /tag and layers creat a new lag name it CameraFocus
    be sure that you named your game object CamerFocus

    [2] make a empty game object , make it child of your charter, name it CameraFocus,

    [3] go in inspector transform of the empty game object ( cameraFocus) do a reset,
    it wil sets his location into you character then move it up

    place this CameraFocus ( your empty gameobject) in the characters neck / chest or head,
    waist is the best place to see in closup piece of your chest and head ;-)

    [4] in the inspector set the (empty gameobject) CameraFocus at tag : CameraFocus and layer :ignore raycast

    [5] then drag your ( empty Gameobject ) CameraFocus into the target of your camera
    *****

    THats It !!
    ****************************Happy zooming *******************************

    so please this is not a negative post or attacks ;-) i just wanted to explane how a mouse works in world of warcraft ;-)
    and i would love to have the right scripts
     
    Last edited: Jan 15, 2015
  6. toLucky

    toLucky

    Joined:
    Feb 27, 2016
    Posts:
    4
    Fixed code for Unity 5.3.2f1 ... All credit goes to #sandolkakos for his super work ;)

    1. Download script - put it in Assets or Assets/scripts
    2. Drag it on top your camera.
    3. Open your camera and find the Wow Camera (script) - in that find Target
    4. With the script open: Drag and drop your player into the Target slot of the script
    5. Start the game and look at your player

    Happy coding
     

    Attached Files:

    Revick likes this.
  7. Eric-Eidel

    Eric-Eidel

    Joined:
    Jan 20, 2014
    Posts:
    5
    So... Nothing in this thread was what I was looking for. Luckily, I found this gem: https://ruhrnuklear.de/fcc/ . Check it out for a great implementation and a demo scene on a WOW-like camera and controller. This is by far the best implementation I've seen and it even comes with a demo scene! Can't wait to dig into it. :D
     
  8. zaneiel

    zaneiel

    Joined:
    Feb 28, 2018
    Posts:
    1
    Thank you sooo much.. i spent several hours trying to fix this... your script is awesome :)
     
  9. ScorphiusMultiplayer

    ScorphiusMultiplayer

    Joined:
    Nov 10, 2018
    Posts:
    66
    Hi, can you add the feature of Tab-Targetting, so that the camera looks at the target from behind the player?
    Similar to Darksouls like targetting.
    Thanks.
     
    Last edited: May 17, 2019
  10. k1mset

    k1mset

    Joined:
    Dec 4, 2012
    Posts:
    64
    No ones posted here in over a year, and now you want custom made features added to a camera system that is designed to be like WOW, not Darksouls? O....k....
     
  11. csofranz

    csofranz

    Joined:
    Apr 29, 2017
    Posts:
    1,556
    Given that witcherx wants something akin to Darksouls, it's only fitting they necro'd a thread.
     
  12. ScorphiusMultiplayer

    ScorphiusMultiplayer

    Joined:
    Nov 10, 2018
    Posts:
    66
    Sorry, but I found this post to be very useful and thought that camera movement can be developed further as targeting is integral part of camera movement in many games.
     
    Last edited: May 18, 2019