Search Unity

World of Warcraft Camera and Character Controller

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

  1. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Yea theres a major memory leak or something with collision, i have 2 meshes both under 9k tris and my player in the scene + a 1000 x 1000 terrain with default detail settings, as im walking across the terrain randomly fps is dropping to 30 - 40 fps like its calculating collision against meshes im not actually touching, also as soon as i walk up against something immediately drops to 2 - 3 fps. its so bad i cant do any development on my game right now because alot of what i need to get done involves getting areas built so i can test features out. the console is getting spammed with [RPGMotor] Contact point (521.3, 121.7, 630.4)
    UnityEngine.Debug:Log(Object) and [RPGMotor] Clamping to ground, distance: 0.02496338
    UnityEngine.Debug:Log(Object) obviously always different numbers based on position.

    I also found that if you change the angle of slop you can walk on say because you have some steeper stairs, when you try to run up a steep slope on the terrain you start to go up and then fall right through the ground.
     
    Last edited: Mar 28, 2012
  2. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Efraser, I'm sorry to hear this. I think the best thing you could do is pack up the project scene and send it over to me so I could have a look, it could very well be that a lot of objects are created for some reason and then the GC steps in, or anything else really. Since you're the only person that has had this problem and I have not managed to re-create it locally it's very hard to debug over the forum/by talking.
     
  3. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Heres a quick video of what i was talking about

    http://livestre.am/1maIA
     
  4. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Im compressing the package for ya now ill send you a link in pm.
     
  5. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    i did change the building that you cannot walk inside to a convex mesh collider which should simplify the collider atleast thats what it looks like thre are much less triangles in the mesh collider but even those cause major frame rate drops to 1 - 2 fps i also noticed that when you jump while your moving you stop moving which shouldnt happen you should continue moving if you jump in the air, i did change the z under the jump force to 10 - 20 and that someone simulates what should happen but i dont want to move forward if im standing still.

    Edit:

    I put together a test to see if it was the controller motor or actually collision in general because it doesnt usually cause problems unless im moving into something but as you can see from this video, when the rocks collide with me the frame rate drops drastically.

    http://livestre.am/1mbD0
     
    Last edited: Mar 28, 2012
  6. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    @Efraser2007 Are you sure it's not just the Unity debug logging that causes that slowdown? Try turning off the logging I see going on at the bottom. I have a framerate drop exactly like that when I do a lot of logging on collisions.
     
  7. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    I get this too on normal terrain (no obstacles). If I could make a feature request related to this, it would be to be able to tell the camera to stay a certain height *above* the terrain. Right now it goes down into the grass and all I can really see is grass. (I haven't looked into modifying this myself, seems like it should be pretty easy for me to add a height.)
     
  8. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Hi fholm,

    Great looking package. I know it's not part of your engine, but outside of turning off or reducing gravity through maybe a water volume trigger, is there much more involved in adding a swimming component to it? Also does the system have a left + right click run?
     
  9. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Turning of/reducing gravity would be the first yes, I have not looked into this too much. I've been thinking about adding it to the controller eventually, but that will probably be in 1.5 or 1.6 (so some time in the future, currently at 1.3)

    Yes, it's called "Mouse Look And Run" in the inspector/code. The default setting is that if you press LMB+RMB you will get the mouse look and running forward style movement from WoW.
     
  10. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Ah great. I've just bought the package and had a little play with the demo. The only thing I've noticed so far that I would have liked, though can add myself is a gradual turn when the right button is held down (i.e. WoW) But I suppose this required turning animations. Similarly when you move the camera around with the left mouse and then press right click, he instantly snaps to that direction. A small turn would look really great.

    But overall it's a very, very fluid engine. I had previously gone through the 3d Buzz third person controller tutorial and redone it in Javascript (The tutorial is in C). But even with a lot of tweaking I didn't reach this level. A great package, thanks a heap!

    Also I'm not sure how the Unity people think their third person MMO control compares... at all. Don't get me wrong, I love Unity and it's developers. But this is leagues above.
     
  11. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Thats what it was lol, i turned off debugging and im back to almost 200fps but the jump thing i posted last night def is annoying lmao im running and i go to jump off a cliff but instead i stop and move up in the air in place and then slide down instead.
     
  12. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Oh, glad you got that ;p Yes if you have full debugging on then that will slow you down to a crawl.
     
  13. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    ye alol and i kind of modified the way you were doing your minimap btw i got it working more as an mmo minimap where it follows the player around as they move like it should but i gotta figure out how you have it checking the players position because it should just be in the middle of the minimap since it is centered on the players position. the way you have the minimap setup is setup more like a world map where the map doesnt change and doesnt move.
     
  14. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    I am aware that I have to writer a better tutorial for the MiniMap, but if you set it up properly it should move with the player when you're zoomed in far enough (if you watch the tutorial video you will see this). If you're not seeing this behavior you have probably set it up wrong.
     
  15. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    probably haha :p i also use NGUI im not sure if i can do anything with render textures with ngui or not i will have to take a look at it but definately very happy with your products :) A+ for support and quality :p
     
  16. AndOProd

    AndOProd

    Joined:
    Sep 20, 2010
    Posts:
    101
    Hi had a similar idea lol ill just buy yours instead xd
     
  17. SaltSlasher

    SaltSlasher

    Joined:
    Sep 11, 2011
    Posts:
    43
    Do you have any other assets for sell, or do you plan on releasing any others after this one?
     
  18. WillModelForFood

    WillModelForFood

    Joined:
    Dec 5, 2011
    Posts:
    143
    Amazing, you should so add a procedural wall climbing and parkour system to this. This is one of the features that I think would sell really well on the store. Just not with triggers. :)
     
  19. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    I also hope for other moving solutions like in the classic donkey kong, mario, banjo kazoe and zelda games.
    A solution that let me climb on trees and walls, swim and dive, crouch .. and more ...

    If i could do even the simple swimming part i would do it but i can not.
    But i would be happy to spend my money for a good solution and i think other developers too.
     
  20. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Check my signature, also the next one up for release is a "Scrolling Combat Text" / Damage Numbers package.
     
  21. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    While it is a really good idea, not going to happen :) I have no personal use for it, and it's _a lot_ of work.
     
  22. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    All of the assets I'm releasing are components taken out of my own game, and since I don't need anything like what you describe, it will not be built. Maybe at a later stage, but that's going to be months :)

    Swimming will be added in a future release of this controller.

    For me it's not about the money, but the amount of time I have to invest into something to polish it to get to a level of quality I'm happy with.
     
  23. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    I'm loving the way you work - and an SCT package?! Sign me up!
     
  24. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    I would purchase the scrolling combat text but I already wrote a system for that with ngui back during the flash competition for my entry heroes call hehe
     
  25. Unicron

    Unicron

    Joined:
    Sep 28, 2011
    Posts:
    191
    Just tried the new 1.3 version, works great so far, also is it possible to toggle the "mouselook" so that you don't have to hold it in?

    I'm wanting to set the camera to the right of the character on play and would like to mimic the movement of a side-scroller wherein the the A&D keys will move the character left and right but then also W&S up and down.
     
  26. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
  27. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Why not make a encrypted package like Molebox or Cameyo. A good camera is very tricky, no demo means no evaluation means no sale (for me)

    http://www.cameyo.com/
     
  28. BruwtForce

    BruwtForce

    Joined:
    Mar 17, 2012
    Posts:
    23
    Not trying to be a jackass, ok maybe a little, but how about we get the tutorials you said you would do for the minimap before you push out another package :p
     
  29. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    All in due time, and you do sound like a jackass ;p
     
  30. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    That's fine with me if you don't want to buy it, the few lost sales is nothing compared to having the source ripped out from the demo.
     
  31. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    Hi fholm,

    I am likely doing something wrong. But it seems that if trees are painted on in the terrain editor, and you tag the terrain as Terrain, the player and camera can pass through the trees. Is this intentional?
     
  32. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Have you set a tree collider on the trees and enabled tree collisions? That should stop the camera. Currently the player can still walk through them though, this is the major fix for the upcomming 1.4
     
  33. gumboots

    gumboots

    Joined:
    May 24, 2011
    Posts:
    298
    I've set the trees to be given colliders in the terrain editor, though not sure where to enable tree collisions? When you release a fix, it is obviously a matter of resetting up the engine, right? So any additions/changes I make should be saved somewhere?
     
  34. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    If you change anything in the code that comes with the package, you will most likely need to do the setup again. But if you don't you should be able to just drop it in place.
     
  35. hesa2020

    hesa2020

    Joined:
    Jul 27, 2011
    Posts:
    261
    You done Hover and Under Water Swimming yet ?
    Add a demo to it like i done so i can test and compare wich one is better
     
    Last edited: Apr 1, 2012
  36. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    I don't think you are protectin much cos someone can buy and share the source, but if that's your attitude, fine. I will spend my money elsewhere.
     
  37. RayWolf

    RayWolf

    Joined:
    Mar 24, 2012
    Posts:
    87
    comon...there is no really a need for a demo actually...just some new videos to show the functionality and how its set up.^^ Also there was mentioned its not all about making money here.
     
  38. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    A camera and character controller is very difficult to setup correctly, with collision and all. If it's not about making money, why the concern with piracy??
     
  39. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    The controller and camera couldn't be any easier to setup, he also gives you documentation and a step by step video. If you can't figure it out after that then maybe you shouldn't be trying to make a game at all.
     
  40. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Building one from scratch sure is, but I would not say this is hard to setup. It will take you maybe 15 minutes at most.

    Well, just because my main concern isn't making money doesn't mean I consider illegally copying something okey either? Anyway, I really don't wanna turn this thread into some flame or something, understand that I hold no grudge against you for not wanting to buy something that you can't try before!
     
  41. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    It's not difficultly to setup your camera system, it's how it performs in the in the environment. If you use an encrypted package like molebox to make exe demo, no one can extract the files.
     
  42. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    honestly you sound like your trying to pirate it, the comments,videos, and documentation should be enough.
     
  43. EarthLaunch

    EarthLaunch

    Joined:
    Mar 7, 2012
    Posts:
    62
    He already stated his reasons for his decision and they are good ones. You should let it rest. Plus, everyone has said his camera is great, so your skepticism is misplaced.

    Personally, as a developer, I don't fool around with obfuscation and the like because it's not what I want to spend time thinking about. My peace of mind and my time are worth more than a few theoretical extra sales.
     
  44. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Honesty, I think you should think before opening your mouth. If fholm does not want to put a demo, fine, but I see that as no concern of you to keep attacking me.

    Does the camera handle coliisions or cut through walls? I see the video it went below the terrain. Is that a feature? Does it use spherical coordinates to swing properly? What is good enough for some might not be fit everyone.

    I'm well capable to implement my own camera, but if there's something good and saves me time, I will glady purchase it.
     
  45. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Can you guys stop ruining my thread? Just please stop arguing with each other and leave it, this thread is for discussing the controller. Please don't respond to this, just stop arguing.

    Imtrobin: also you know that the package is not just a camera? The main feature by far is the character controller.
     
  46. hjupter

    hjupter

    Joined:
    Dec 23, 2011
    Posts:
    628
    +1

    Hey fholm how is 1.4 version going? can you give any detail about the roadmap? I mean whats coming on the next version if its not a secret :)
     
  47. fholm

    fholm

    Joined:
    Aug 20, 2011
    Posts:
    2,052
    Controller:
    terrain tree collisions.
    Capsule collisions

    Camera:
    More settings on the camera
    Even better camera collision detection
     
  48. Legacy

    Legacy

    Joined:
    Oct 11, 2011
    Posts:
    651
    Also i did find a bug, if unity loses focus of the mouse you can no longer turn the camera with the left mouse click.
     
  49. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
    Sorry, no intention of turning it to a flame thread, but I kept getting insulted.

    I did not realize the main feature was the character controller, not the camera, but they really work hand in hand together.

    a demo to show how it works in various environments (of course this product does not work that well)

    http://www.gameprefabs.com/products/show/87
     
  50. kimsama

    kimsama

    Joined:
    Jan 2, 2009
    Posts:
    166
    Hello,

    I've tested RPGMotor with my existing project.

    Here is the problem, :

    When the first time the character which has RPGMotor is shown on the scene, it works fine.

    And the new .scene file is loaded when my character is go into the portal.

    The new .scene file is totally loaded the character is not located where the spawn point it should be but it falls down.

    I guess RPGMortor should be slept when a .scene file is changing and loading.

    Or there should be some Sleep or Restart functions so, it could be handled explicitly.

    With CharacterController, there is no problem. It maybe CharacterController seems to be handled that circumstances.

    Thank you.


    -Kim