A Unity ID allows you to buy and/or subscribe to Unity products and services, shop in the Asset Store and participate
in the Unity community.
Discussion in 'Assets and Asset Store' started by VisionPunk, Mar 9, 2012.
I just purchased this product, and I am not disappointed! Kudos to a wonderful system!
I just bought this and I'm using it with the Unity 4 beta. The demo scenes run flawlessly, but when I drag the FPSPlayer prefab into my own scene and hit play, it fails in the Awake function with the following error:
Cannot change GameObject hierarchy while activating or deactivating the parent.
vp_FPSWeapon:Awake() (at Assets/UltimateFPSCamera/vp_FPSWeapon.cs:122)
vp_FPSCamera:SetWeapon(Int32) (at Assets/UltimateFPSCamera/vp_FPSCamera.cs:1098)
vp_FPSPlayer:Start() (at Assets/UltimateFPSCamera/vp_FPSPlayer.cs:94)
The error message seems straightforward... basically saying you're not allowed to change the hierarchy like you are while it's being SetActiveRecursively from the parent. But it works fine in the demo scenes. Am I doing something wrong? Maybe this is a side effect of Unity 4's changes to the way Active is set on game objects?
A little more info:
I just tried opening the demo scene, disabling the FPSPlayer, and dragging in a new one, and it fails with the same errors. If I disable the new one and reactivate the old one, it's fine. I went back and forth between the two in the inspector with debug mode turned on and I can't see any difference. I even clicked Revert on the original and it still works fine, but Revert on the second doesn't do anything and causes it to still fail. Very strange.
Thanks for highlighting this! Yeah it could definitely be an issue with the new Active methodology. Haven't gotten around to testing with Unity4 yet but it's getting closer so might aswell get started this week. I can't give you an answer before having looked deeper into it in a couple of days, but I'll get back to you (if you like, please email me any further findings).
This is content driven; the decal is in fact just the geometry added to the bullet object. The bullet prefab has a vp_Bullet script on it. On impact, the bullet transform is instantly moved to the target. If the prefab has a renderer, the attached geometry will end up at the point of impact. It can be a decal mesh. It can also be a blob of slime or an arrow. If the bullet prefab has a renderer, it will be added to the decal manager and queued for deletion later. If not, the bullet will be removed shortly after impact. So if you're doing a mobile game or something else where decals might be wasteful, you can just remove the mesh filter and mesh renderer from the bullet object and you should be ok.
Hope this helps, and glad you like the asset!
Thanks SevenBits =)
Hey, you've earned it.
Ultimate FPS Camera v1.32 is now available in the Asset Store. This is a small bugfix update. Also, some simple code comments have been added for demonstrating how to play conventional animations on the weapon in vp_FPSPlayer.cs.
For the full list of changes, see the RELEASE NOTES
Is anyone else trying this with Unity 4? I'd like to know if anyone else has got it to work.
I have two problems that I hope to get help with regarding this asset.
1. Why is it that when I change some of the settings like bob,shake and zoom, it always reverts back to the default settings when playing the scene? I save the new settings and load them but it always goes back to default once I start moving.
2. I have been trying to get Unistorm to work with this but when I tell unistorm to use FPSCamera, everything is a grey color. Also I get errors stating "object reference not set to an instance of an object". It works fine with any other camera but not the one above.
The Unistorm thing is probably because image effects are funky with the overlapping FPSCamera and WeaponCamera. If you look at the end of the documentation, there's a section about whether each Image Effect should go on the FPSCamera or the WeaponCamera. Unfortunately I don't think there's an easy way to split Unistorm's image effect control between two different cameras.
I am trying to figure out how to deal with it as well; I'm thinking I might just not use the WeaponCam at all, since I don't really mind the weapon poking through geometry when you run up to a wall; that's a fine tradeoff for having better postprocess effects IMO. I'm not sure yet how easy it will be to use the system without the weapon camera though.
Are you referring to the image effects that come with Unity pro? I own the free version.
Yes, sorry. In that case, it might be because your FPSCamera's Far Clip distance is set too low. It needs to be set way up to like 10000 to see the skies properly.
I already have it set to 15000. Hopefully VisionPunk may know why. Cheers for trying.
awesome asset and at an amazing price.. thanks so much!!
I just purchased .... awesome tool!
Features that could be nice to have in this tool:
- Footsteps sound system
- Ladder system
- Add some non weapons tools like Binoculars , flashlight, hand with GPS/PDA or topographic sheet with map.
Just FYI; I got a response from Unity that they were able to replicate this bug and are looking into it, so hopefully it's something they will fix on their end. I've run into it in a few more places other than your plugin and was able to create a very simple repro.
These can all be done by the developers using this asset. Non-weapons can be easily placed in, just follow the instructions about adding weapons in the documents.
Are you planning to add old style Doungeon Crawler movement?
Thanks Unicorn...I already made some tools with this nice system (Flashlight, hand with PDA ) ...my meaning is that could be a plus value to add these abilities by default to make this tool more interesting for non shooter developers (visualization..exploration...etc).
If we buy this, are all future upgrades free?
Right, gotcha, but you can also use this kit to create non-shooter first person type games by not adding in any kind of weapons.
The main feature of this kit is basically the camera and spring systems.
Hi Acelondoner, I just released v1.32 that addresses this issue. If you haven't already, please update and see if the problem persists.
*If you could email me the full error log with line numbers that would be great. Like makeshiftwings said, if all else fails you could get rid of the weapon camera. I tested running the system without the weapon camera a while back and as I recall it worked fine. There may be some warnings / errors though. Let me know if you can't get it working and I'll help out. Drawbacks are: the weapon will stick through geometry and you won't be able to use a separate FOV for the weapon. However the weapon will work better with image effects, shadows etc. TIP: I used Torque game engine a few years back. They addressed the weapon clipping issue by raycasting in front of the weapon and moving back the weapon transform if you got close to geometry. This worked really well.
Hope this got you somewhere..
Awesome, thanks for your effort.
Not at this time, sorry.
Hi sjm, Thanks for the suggestions. All good ideas.
Hi Fishman, Yeah; all future upgrades are free for any single product you buy in the Asset Store. Unless it's an addon released as a separate asset (for example, the RageTools asset requires RageSpline, but they are separate products).
I was having this problem also and then I found out why. When you change one of the values in the inspector you have to hit the APPLY button in the upper right corner of the inspector. This applies the changes to the prefab and then the changes will stick. I almost pulled my hair out until I noticed that little button and decided to try it
Yeah, a lot of prefabs built with the Editor framework do that sadly. Nothing you can do about it.
You have done some great work with this asset... its an awesome start for anyone wanting to make a FPS shooter...
I see you get a lot of requests.. I think it is wise if you concentrate on system specific stuff and not go out of your way to make someone else's game... couldnt ask for a better starting block than this system, and people should now learn how to add game play improvements themselves and create some great looking games with this asset as their base...
thank you, it's not a problem.
Planning to add some take object animation, drop object and stuff like that?
Been using the package for a bit and I really enjoy it. It makes things fun! Best asset I have bought.
Question about UpdateMouseLook in the VPSCamera class. It seems like it is not frame rate independent. So I have mouseX and Y being fed by Raw axis data of a game pad. Depending on my framerate it spins around faster(at higher fps). I tried taking m_Yaw and m_Pitch and multing them by timeDelta. If I start a spin around it seems close to same rate when I dip FPS but then if I stop turning then turn again while the FPS is lower the rate of camera movement is lower again.
Any input on this issue?
Show us the code you're using.
Yeah, it seems easy to forget that the asset is called "FPS Camera", but moving forward I will prioritize features relating to the camera and weapon aspects first and foremost.
This has been requested before and may be considered in a future release. It would be fun to do! Can't say when though.
I'm pleased to hear you like the asset. I'm less pleased to learn you're having problems with framerate independence . This is the first report I got regarding this but I'm sure there could be some flaw in UpdateMouseLook. My first idea would be to try and multiply the raw joypad data with delta time prior to feeding it into UpdateMouseLook (this is probably way off mark but it's worth a try).
The last bit you wrote about (describing how the behavior changes depending on whether you are in the middle of a spin or if you start a new spin) has me thinking the values of the Unity Input Manager HERE and HERE could be involved somehow, but I haven't worked with gamepads in Unity before.
Let me know how this progresses for you.
I am trying to get some GuiText and Controllers (ie mobile control textures) on the screen. A simple way is to just drag the Dual Joysticks prefab from the Unity Assets.. When i have a FPSPlayer though, the controllers and GuiText does not draw...
Is there something I need to do to get the 2D stuff to draw when using the FPSPlayer camera ?
How would one configure this to work with iPhone controls (ie duel joysticks) rather than the inbuilt mouselook?
This is because the "Dual Joysticks" example uses GUITextures, which require a GUILayer component to render. Just add a GUILayer component to your FPSCamera and it should work.
Hi Rory (and @gviddy),
UFPS is not mobile ready out-of-the-box yet, but plenty of people have used it for mobile projects. See the following discussions:
So... I just heard back from Unity about this, and unfortunately they said it's intended behavior for Unity 4 and they don't plan on fixing it. So it looks like if you want to make your plugin compatible with Unity 4, you'll have to move all the code that creates child game objects out of Awake or OnEnable and into Start or Update. :/
Ok, big thanks for looking into this, makeshiftwings. I have made it a top priority.
Is it easy to make another weapon, with for exemple a 2 two hand wand with the provedural motion of Ultimate FPS ?
Adding a new weapon model is very easy. Just drag a custom weapon model into the FPSCamera hierarchy in a couple of easy steps. It should work pretty much instantly.
Currently the system is limited to one procedurally moving weapon model at a time. However, if you were to use a single model with both arms holding one (or two) weapon(s), that would be no problem. The arms could be individually moved by means of a regular Unity animation acting inside that one model.
Also, the shooting class is separate from the weapon class so you can add more than one shooter under a single weapon to get i.e. a secondary firing mode such as a mounted grenade launcher. You can also easily attach your own shooter classes if you want custom effects and gameplay such as magical weapons.
With that in mind, what are your future plans for this camera system? As in what sort of things are you working on or planning to add in the future? One thing I was wondering, is if you plan to add the ability to crouch walk lay prone/roll side to side. Most modern first person shooters have this ability, so it would be cool to have this option.
If not, assuming I'm not much of a coder, how hard is it to change camera views, is it something I could maybe search through the code and add in adjustments easy enough?
(sorry if it was discussed earlier but didn't want to read all 28 pages )
I would like to be able to freeze the camera/controller by right clicking (similar to Enter in the demo) and interact with an interface. I've gotten into the scripts some but there is a lot to go through. I thought I would start by asking here. Thank you!
There's no roadmap at this point. See this post for more info.
Crouch walking is supported out of the box (if I get you right and you mean "crouching and walking at the same time"). A prone state should be easily achievable by modifying the crouch presets and creating a prone state using the state system (it's actually very powerful: see the manual for in-depth info on presets and states). Roll side to side sounds a bit game specific for a generic FPS asset (see this post).
The FPSCamera has a ton of options that can be tweaked in the inspector. See the manual for more info on this. If you want to pass control to a cutscene camera or a third person camera this might be a little more tricky but you should be able to do this by temporarily disabling the FPSPlayer.
Hey topofsteel, What you need is the "LockCursor" property of vp_FPSPlayer. You can study how this works in "vp_FPSDemo2.cs -> Update".
if (Input.GetKeyUp(KeyCode.Return) || Input.GetKeyUp(KeyCode.KeypadEnter))
m_Player.LockCursor = !m_Player.LockCursor;
Hi, I am just wondering, any plan to incorporate "Full Body Awareness" into the future version?
"Full body awareness is a feature of first-person games in which players are able to see their entire body. This gives the player a better sense of immersion, as they can see their actual body and any arm and leg movement from a first-person perspective."
I would really like to see that happen - with the physics based rig.