Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

World of Warcraft Camera and Character Controller

Discussion in 'Assets and Asset Store' started by fholm, Mar 2, 2012.

  1. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    Hi, I finally managed to get this working (with a few issues, but Ill leave them for now)

    Thanks for everyone who gave me hints and tips along the way...

    The main issue I'm having now is that much of my game is programmed using PlayMaker, but more specifically, Im using PlayMaker Trigger Events. They are attatched to collidors, and with a simple character controller, are working very nicely, to trigger automatic doors, NPC animations (when I enter rooms for example) and GUI text elements (pop-up text explaining elements).

    But they do not work with this controller... pretty obviously really, as this one is relying on tagged elements to be "walkable" or the special "RPGmesh" script for collideable (is that a word) objects.

    What would I have to do to make this controller trigger a collidor and thus send a Trigger Event to PlayMaker?

    cheers

    Mark
     
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    You can add a normal collider to it also, as a kinematic rigidbody, as it will trigger events IIRC.
     
  3. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Any update on when the next update fixing some of the bugs will be? And congrats on the baby btw.

    Regards,

    Efraser2007
     
  4. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    Agghhh.. wait a mo... Have to confirm...

    Actually I JUST have a normal collider.. (I tend to delete the mesh bit) which I use to make invisible areas that trigger stuff... but your controller doesnt seem to trigger it...

    Wait... you mean I should add a normal collidor to the charater???? Dang.. yes.. of course...er... maybe.... back soon...???

    thx

    M
     
  5. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,443
    Hi - Jumping doesn't seem to inherit the momentum -- Seems to have the same speed whether I am walking or running. He should jump at the speed he runs or walks - To see the problem, load the demo, set the "ForwardRunSpeed" to 10, and run around and jump. Is there something I can do to make this work right? ie - not instantly lose momentum in the air?
     
  6. homeros

    homeros

    Joined:
    Dec 23, 2009
    Posts:
    121
    I just purchased this asset and it is pretty easy to setup. However I had the same problem markfrancombe encountered but I figured out the problem in 30 minutes of testing :)

    On the script RPGMotor I set the target to the actual character (which I assumed the gameobject would act as a wrapper and the character would be the actual target). You do show the correct way in your manual but maybe an extra caution line is required for the future buyers.
     
    Last edited: Jul 23, 2012
  7. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Here comes the dumbest question on this thread:
    My player falls through the floor unless I turn gravity off.

    I am just using a Mixamo Ani, and if I use stock it works fine, in the Inner city Race track asset.
    That means, I am hoping, that the floor is good, any ideas please?

    Thanks for a great package!
     
  8. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    Does your ground have a collider on it?
     
  9. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    I had to put a mesh collider on it to get the stock mixamo to work, so I believe so.
     
  10. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    Make sure you add an RPGMesh script to the object if you're not using a primitive or terrain collider, without it the motor doesn't know how to collide with it.
     
  11. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Okay, thanks will try that.

    didn't see that step in the pdf, and I also checked your viking and didn't see anything like that attached, guess this is why I missed it.
     
  12. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Hi again,

    I have added your RPGMesh to my ground; it also added Mesh Collider and Mesh Filter.
    However, character still drops through the ground; sorry, I know its something simple...

    I have, now, also loaded your demo scene and cannot see where RPGMesh is used in there.
     
    Last edited: Jul 24, 2012
  13. gorrister

    gorrister

    Joined:
    Jul 22, 2012
    Posts:
    2
    I have a little issue with my tutorial (demo works fine). The Viking falls through the terrain. I not sure but i think the problem is the param "Walkable". The PDF manual says "Walkable – The layers our character should collide with, set this to Terrain and Obstacles" but i dont have any Terrain or Obstacles. My options are:
    Nothing
    Everything (choosing this options game runs well)
    Default
    TransparentFX
    Ignore RayCast
    Water.

    However, Walkable in the Demo, has the value: "Unnamed 8, Unname 9" and works fine.
     
    Last edited: Jul 24, 2012
  14. theLittleSettler

    theLittleSettler

    Joined:
    Jul 14, 2012
    Posts:
    36
    I also see this bug...

    One question: Do you have recommended a way to go about tree collisions currently? I take it you'll add it at some stage, so till then a recommended hack is fine...just something which works roughly (or if its included in the next version only a few weeks away that's fine).
     
  15. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    The layers Terrain and Obstacles needs to be created, I need up update the manual apparently as it's not only you guys that have miss-understood me there.
     
  16. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Still stuck on the basics.
    I have a plane, on a level called walkable with the RPGMesh script attached

    I have a character, with a the RPG scripts attached.
    If I leave gravity on, it goes through the floor.
    If I turn it off, it doesnt.

    I have looked at the demo / tutorial and I cannot see what I have done different.
    In fact, I cannot find where RPGMesh is used in the demos / tutorials.

    Thanks.
     
  17. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    I thought the problem might be down to layers.
    So I have added another layer above walkable and have called it player, and put my player in the higher level; still falls through the floor with gravity turned on.
     
  18. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Finally making some progress.
    The dropping through the floor was fixed by raising the holder for the character .1 on Y, even though it looks like it it on the floor (all other are at 0/0/0).

    Next problem is that the character seems to glide, and for every 2 steps forward, seems to do two steps back.
    By slowing down the setting for speed on the motor and the animation I can almost stop the gliding effect, but it still jumps back every two steps.
     
  19. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    Hi Edgley..

    I am still having some trouble, but I have been fiddling enough that I have had some of your issues and fixed them:

    First, DO.. go to the layers menu and CREATE a layer called... for example.. WALKABLE. then everything that he can walk on needs that setting on layers.
    second DO create a layer called OBSTACLES and do the same for stuff he might crash into, like buildings, dustbins, and S***...

    Make sure that both places in the scripts that need these layers are selected. Thats walkable in RPGMotor and Obstacles in RPGCamera.

    The RPG Mesh is just for adding to imported mesh objects... the terrain and primative objects from Unity should work anyway. If you look at his demo, the RPGMesh is only added to the teleport box thingy...


    As for the gliding and snapping back...
    Gliding is just setting the walk speed to match the animation you have, just fiddle and you will find it.. BUT...
    Snapping...
    Im afraid thats because you have bought the wrong Animation from Mixamo. They do alot of animations by scanning a real human, this makes their Animations pretty good, but for movement Walking and running and jumping they move the characters and dont walk on the spot. This controller only works when anims walk on the spot. Mixamo has some system (that I cant use) that cleverly uses the skeletons transform to calculate position, so if it moves, the forward movement is slowed down, or at least kept correct.

    If you want to test this, just selct the character, bring up the Animation window and select the walk anim, and hit play...
    BTW I had the same prob with my jump anim, I TRIED to compensate by overlaying a transform animation onto to keep the jump "on the spot" but it cause all sorts of other problems, like if the anim blended with something, it couls end up missing the ending bit, and my charater was half underground suddenly...

    Best Solution, go back to Mixamo and get an animation (why do they call it a "Motion?) and get a new walk anim.
     
    Last edited: Aug 3, 2012
  20. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    OK... MY new problem comes with a new bit of my level, whe the character has to walk up a plank, that is propped on a fulcrum, as the character walks over the middle it drops on the other side...

    I Can get it to work by adding a collider and a rigid body... (he tends to kick the plank now, but I can freeze movement )

    ...but the "See Saw" is rather ok VERY jerky...

    With the normal character controller I had the problem that thats not a real rigid body, so some kind person made me a little script to add "weight".. this infact...
    Code (csharp):
    1. var weight: float = 10;
    2.  
    3. function OnControllerColliderHit(hit: ControllerColliderHit){
    4.   if (hit.rigidbody){
    5.     hit.rigidbody.AddForceAtPosition(-Vector3.up * weight, hit.point);
    6.   }
    7. }
    Any simerlar hack I can do here? without the rigid body he just doesnt push the SeeSaw down...


    MArk
     
    Last edited: Aug 3, 2012
  21. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Thank you for taking the time to answer my questions.
    I shall go play some more, and contact Mixamo as they do state everything works with everything.
     
  22. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Okay, reducing the glide problem.

    However the two step / one step is still there even when I use the character that is supplied with the motion set.
    I guess I will have to work my way though the different ones I have to see if I can get it to go away
     
  23. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    Snapping problem seems to be because of a difference in the loop time and the actual animation time:
    http://forums.tigsource.com/index.php?topic=22113.0;wap2

    I have been swapping the two values around but cannot come up with the magic value where the two balance out.
    Am now looking at scripts, going wtf, wtf, but still have hope :)
     
  24. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
  25. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    I just checked out your demo, did you do anything different because in your demo it seems to keep moving forward when you jump where as the current version i have stops you from moving forward when you jump o_O
     
  26. edgley

    edgley

    Joined:
    Feb 13, 2012
    Posts:
    65
    How about helping me out rather than trying to get more sales?

    I am about to ask for a refund as I still cannot get your product to work and you do not respond for requests for help.
     
  27. merlin981

    merlin981

    Joined:
    Apr 16, 2012
    Posts:
    305

    Edgely, it is working for the rest of us. The dev is working on new feature requests, but the addin does work. He has been very active in answering questions here in the forum. If it's not working for you, then re-read the manual and review his demo. You have a setting wrong, or something similar is preventing your character from behaving the way you want.
     
  28. TopThreat

    TopThreat

    Joined:
    Aug 7, 2012
    Posts:
    136
    Hello, how hard is it to add additional animations with this such as when a character wants to stop and smell the roses, or to use an item, etc. Is there an easy way to have it stop other animations such as idling when not moving, run a quick animation such as picking up an item, and then resume?
     
  29. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    This should be handled using the built in features called animation layers in unity really.
     
  30. TopThreat

    TopThreat

    Joined:
    Aug 7, 2012
    Posts:
    136
    Wow thanks for the super fast reply. I will give your controller a try. Thanks for your hard work. My project is pretty simple so hopefully this will work for me.
     
  31. jobic

    jobic

    Joined:
    Aug 9, 2012
    Posts:
    2
    It looks really nice, I'm considering to buy it but I'd like to know if you can strafe or add strafe input without holding right mouse button with this, cause in the demo you can't.
     
  32. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    You can strafe but the only issues im having is collision still, i guess i can just use box colliders but that makes level building and prefab creation tedious. Tree collision is another matter because tree colliders are capsule colliders and capsule colliders are not supported i walk right through trees =/. Oh and there is still the jump bug where you dont jump forward your movement slows down by alot. I know your busy with the new baby and all just wondering if these fixes are on your list :)
     
  33. DirtyHippy

    DirtyHippy

    Joined:
    Jul 17, 2012
    Posts:
    210
    What is the best method for teleporting the object with the motor/etc attached? You can't just change the transform as it just resets you back to the original position.

    What is the best way to temporarily turn off the motor so I can move the character on a determined path programatically and then re-enable normal motor use after?

    I've tried disabling the motor temporarily, but once I re-enable it, the character always returns to the original position. I'm assuming there is some old position being stored that potentially I would need to reset to the new position.
     
  34. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    Not sure what you're asking here, yes the demo uses the built in unity shaders.
     
  35. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    The right combination of shaders + light values + some other effects is the trick ;p
     
  36. Wudek

    Wudek

    Joined:
    Aug 10, 2012
    Posts:
    7
    Hey, i'll try to keep this short, I have a player on a flat terrain with random balls on the terrain.

    The terrain is in the Terrain layer, the player is in the Player layer, the balls are in the Objects layer.

    I set the player's RPGMotor's walkable to Objects/Terrain.

    The balls have a sphere collider and a rigid body attached to them.

    When I run the game, the balls fall onto the terrain, and the player can move around and jump onto the balls and collides with the balls.

    What's the easiest way to make the player apply a force onto the balls if he runs into them and vice versa. If a ball rolls towards my player and hits him, I'd like it if it would displace the player.
     
  37. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    277
    I've recently purchased this package from the asset store. Looks like some great stuff here!

    I have a couple of questions:

    1. Will you be releasing revised scenes that fix the problems with Layers being missing? When I go through the tutorial in the manual my viking falls through the terrain. I was able to add a new layer and assign it properly so now it works.

    2. Why are Capsule and Wheel Colliders not supported in your RPGMotor script? Can they safely be added back in? In particular, Capsule Colliders are very commonly used.
     
  38. Modeus

    Modeus

    Joined:
    Dec 12, 2012
    Posts:
    10
    Recently purchased.

    Just a couple pointers, I'm working in Unity 4.0 so I don't know if that caused anything:
    1) I kept getting null reference exceptions when it tried to animate. This is because the Viking prefab had somehow lost it's animations and I had to re-wire them up. After that it was fine.
    2) RPGMotor and RPGInput arrows on page 1 of the tutorial are pointing at incorrect entries, not serious but might mislead if you're not paying attention.
    3) Layer "Terrain and Obstacles" didn't exist, had to create new one.

    Other than that, no issues. Very nice work, I'm going to look at your other work because I'm pretty happy here so far.
     
  39. Eralmidia

    Eralmidia

    Joined:
    Dec 21, 2012
    Posts:
    11
    What is the best way to determine if the player is moving, since there is no rigidbody? Basically I wish to implement to different jumps (running and stand still).
     
  40. zangad

    zangad

    Joined:
    Nov 17, 2012
    Posts:
    242
    This controller doesn't handle basic things like collisions with capsule colliders or trees. The camera offset doesn't work properly for x and z offsets (it switches sides when you rotate around your character). There are a number of other issues the author has chosen to ignore throughout this thread ("it works fine for my game"). Unless you want to go through your entire game and convert all basic colliders to boxes, this is a waste of money. The fix is supposed to be coming in v1.4, but there hasn't been an update for 9 months and there's no indication there will be anytime soon.

    The code is also overly complicated and tightly coupled. You can't turn off parts of it you don't like - again, this system was directly pulled from the author's game and plopped onto the asset store. It wasn't written with modularity or other game play in mind.

    My recommendation is to use the "Third Person MMO Controller" published by the Unity developers, available for free download on the asset store. Compared to this system, it's much simpler to get going, supports basic functionality and rigidbody physics, and is much easier to modify when you need to (and you will always need to tweak any controller).
     
    Last edited: Dec 29, 2012
  41. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,045
    zangad: Strange that so many other people seem to be perfectly happy with the controller. And I'm sorry but the default unity controller is crummy at best, giving weird sliding and clamping issues on uneven terrain, etc.

    Yes the code is tightly coupled, what did you expect? It's one package that does camera + controller, of course its coupled together. The code is not overly complicated for what it does, it's a complicated piece of code, yes - but not overly for what it actually performs.

    Also, what do you know about it being pulled from my game or not? That is simply not true, the original version (1.0) was, but not 1.3 which is a complete re-write, please don't spread BS statements you know nothing about.
     
    Last edited: Dec 29, 2012
  42. zangad

    zangad

    Joined:
    Nov 17, 2012
    Posts:
    242
    No, what's strange is that you chose to nitpick the insignificant details of my post rather than address the actual issues.

    Would you care to comment on why capsule colliders (a commonly used primitive mesh) are ignored by your controller, and why this critical information isn't mentioned in the asset store? I mean, seriously...you expect us to draw boxes around every tree in our game even though they already have capsule colliders around them?

    Or maybe you could comment on why the camera offset doesn't work properly for x and z? I'm not the first one to mention this issue, either. Go back a few pages. This is a simple thing that could be fixed instead of ignored.

    And why won't you respond to the people asking when 1.4 will be out? Supposedly the collider problem will be solved with 1.4, but your customers have been waiting NINE MONTHS for an update.

    There are many people who are NOT perfectly happy with the controller. You simply choose to ignore them. For $10, I wouldn't care. But for $30, you don't get to ignore basic problems forever.

    Regardless, your response clearly illustrates what type of business peron you are. You've already stated several times that you don't care about losing sales, so there's really no recourse I have. I just felt it necessary to raise awareness so other customers would be warned not to waste their money on this product.
     
  43. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    277
    +1... I don't like it when support questions get ignored for weeks/months on end.
     
    Last edited: Mar 23, 2014
  44. Eralmidia

    Eralmidia

    Joined:
    Dec 21, 2012
    Posts:
    11
    I second this. I have tried to contact fholm on mail as well as this thread. No response. I won't be buying more assets from fholm. I'm also considering the RobinS package atm.
     
  45. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    Rather than bash this like others have done, I would like to say, that this package very nearly performs exactly as I would like. I have in previous posts in this thread expounded my interest in certain changes/additions.
    There are rumours of an update, but Im not sure what the likelihood of that is. I do agree with previous detractors that there no point in replies of the "go and learn code" type, that I see often in developers responses. We bought a system like this precisely because we can't code, (not well at least) or we would write it ourselves!

    I'd like to set out the very few things I am interested in changing, and hopefully get an answer on how likely it might be to get these thing implemented in an upcoming update, if possible, I will stick with it because, in terms of moving platforms and stauff like that it works very well..

    I suspect that the first 2 are trivial for the developer, who knows this better than anyone else, the 3rd may be more tricky.

    1. I would like it that when the character is in idle, not walking, and you press A or D, and he turns on the spot, that the camera follows, instead of waiting until the character moves...

    2. I would like a new "shuffle" animation state to work during this movement, I hate it that the feet just slide around.

    3. In my project, that is completely built using PlayMaker, and is a multiplayer game using Photon, it doesnt work to have the camera and the character lumped together under a parent GO. If multiple players spawn into the game, only YOUR character needs to use the camera, but this system breaks if no camera is attached. I would like to see the camera loose in the scene, as a separate entity, and for the character GO, to not throw a wobbler just cos it doesn't have a camera. In affect, it should be able to work as an NPC.

    Mark
     
  46. markfrancombe

    markfrancombe

    Joined:
    May 26, 2009
    Posts:
    150
    A few changes away from perfect... UPDATE:

    Absolutely no response on this thread for a week... do I assume that this product is now dead and that everyone has moved on? Should I do that too.

    Hopefully not.

    OK, I Still REALLY NEED number 1. and 2. in my previous post. Camera following when you turn on the spot and adding a shuffle on turn, when character is still.

    As for the third one, I have some suggestions from the Photon/PlayMaker team. They first was to simply add the camera to the Player... I thought this would break the RPG controller, but ... it dosnt... I simply dropped the "Camera Holder" on the player, and its worked... Really didnt think it would...

    Now it should be trivial to switch of all cameras that are not on YOUR player (Photon has a built in IS MINE, ior IS NOT MINE property, that I can check for and implement stuff with... However...

    WILL turning OFF the camera also throw errors for the RPG controller? Well, turning off the CameraHolder GO Does throw an error, but turning of the Camera itself doesn't!! genius...!

    So.. PLEASE

    Pwetty please

    with a cherry, please look at, do.. or at least tell me how to.. do my first 2 points about on the spot functionality of camera and animations...
    Then I think I will bother you no more!!

    Mark
     
  47. Menog

    Menog

    Joined:
    Oct 2, 2012
    Posts:
    23
  48. DevionGames

    DevionGames

    Joined:
    Feb 22, 2010
    Posts:
    1,624
  49. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    277
    I'm having a problem with RPGMesh. For performance reasons, I'd like to set the buildings in my scene to be Static. These buildings are skyscrapers with complex shapes, so they use MeshColliders and RPGMesh. However, when they are set to Static, apparently their meshes are combined internally by Unity into a "Combined Mesh (root: scene) (Mesh Filter)" at runtime, for batching purposes. This is the source of the performance gain. However, it also means that RPGMesh no longer works, and my character's RPGMotor just walks straight through them in PushBack(). Apparently rpgMesh.ClosestPointOn() is failing to provide a meaningful result.

    Any suggestions?

    One thing I've noticed that may or may not be related... notably RPGCamera is still able to avoid colliding with the skyscrapers by using Raycast. Could this be a possible solution for MeshCollider (and in fact any colliders) collision checking in RPGMotor instead of trying to use RPGMesh at all?
     
  50. Arcanor

    Arcanor

    Joined:
    Nov 4, 2009
    Posts:
    277
    Apparently this is also sometimes now happening with static buildings with only simple box colliders, so this is obviously no longer related to RPGMesh. Sorry for the red herring!

    Please ignore this issue. It seems to be Unity related and not specific to RPGMesh as I'd first thought.
     
unityunity