Ok, so I've been playing a lot of Devil May Cry 1 recently and I found out that I really like third person Hack and Slash games. So I wanted to make something similar using Unity. The character controller I've set up works pretty well for my needs. There is just one problem. The third person camera (Free Look Camera) has like this weird FieldOfView-Change whenever the character is moving.
Click here to see what it looks like right now!
I tried fixing that by changing its properties on the side but it didn't help at all, heck, it even got worse.
Maybe there is a really simple solution for it but I didn't get there.
All I want the camera to do is follow the player smoothly (which it does) but without doing that weird Snap-Back-In-Place-After-Player-Has-Stopped-Thingy (which it does not).
Have you guys got any ideas?
Thx, Anton
The problem is with Cinemachine. From the camera, I can tell this is what you're using. Cinemachine has a lot of options, but you need to locate damping and turn that off if you don't want that delay.
Hopefully this resolves your issue!
I am still new to Unity and programming in general. I have tried looking through the forums for this problem but I feel the need to ask anyways since I get confused reading and trying to tell if the person's problem is exactly the same as mine. I have this code that when you press w which is forward it forces the the player to go forward in one direction regardless of where the player is facing. I know this kind of thing has been talked about before but I want to know exactly where I am messing up. Maybe something with using Space.World instead of Self or combining vectors and transform. Any help would be appreciated.
Screenshot of the code:
so I've been trying to see if I can make use of Wheel Colliders for the past several months now. As much as I've managed to figure out more and more things about how to set them up properly, there's some things I've been noticing that seem impossible to avoid:
Even if your friction sideways stiffness is lower, there's a chance that your car will continue to "spin" or "rotate" in the direction you were steering if you JUST hold down your input long enough to get the car beyond just rotating. I've noticed this will happen, whether for example the "SteerHelper" or "TractionControl" functions are doing their work or not. This will put a dent in ensuring smooth turn movement. Now, I don't know if maybe this is just due to realistic car physics (I mean, I can picture the car skidding in scenarios where they lost grip of the road for sure), but it just feels kinda glitchy. Sometimes, even when I'm not turning, the car will start to turn a little to the left or right and then gradually seem to "lean" that way in terms of applied torque to the rigidbody. I've seen many suggestions for trying to stop the rigidbody from doing this. Here is one way I'm trying to work against this:
rb.AddTorque(-rb.angularVelocity * 2);
However, it seems that the car will still "spin" more than intended. What would be ideal is to be able to MAYBE allow the car to turn a little extra after the left or right steer buttons were released (maybe more or less depending on the vehicle), and no more than that to ensure there is maximum control to give the engaged and maybe arcadey game play I've been going for for a long while.
It's been difficult to adapt an ideal friction curve value that would give the most ideal feel of a drift turn, especially a more arcadey one. I'm not trying to go for wide turns that slow you down, I'm trying to go for tight (yet controllable) turns that allow you to preserve most of your speed. I find that especially at higher values of stiffness, as I know many people have observed in other posts, that again, the car will turn back an extremely high amount sometimes (you drift left enough, a force is turning your vehicle way to the right). It's sad, because I've wanted to be able to say I've "mastered this beast" and used it for my purposes, but I don't know if that's really a good practical expectation for anyone. I even worked my own alternate friction curve values that would be used in the controller:
But I guess as some people say, you can't polish something that's broken? Moving to the third point...
I've read so many posts that show how to adjust a vehicle's center of mass, or to add more colliders in different spots to correct it, using scripting to add an offset to the center of mass, etc. So many tips that say, "lower the center of mass, you'll find it" and I give that a try. When the center of mass is too low, my car can get pretty shaky on the terrain (not that it hasn't in the past, but it's often been things I could correct, like the weird initialization of the attachedRigidBody of the wheel colliders themselves in the beginning, etc). High enough, and of course, (even when it's lower sometimes???) the car will just start spinning in the air on either multiple axes or specifically the forward z, when you drive off a ledge or bump into something with a high enough speed. It just seems inevitable.
I've been trying to give my benefits of a doubt. I like to think there's a correct way to use this thing, and that I'm just not familiar enough with Unity3D physics concepts. However, it just seems more and more that I'm investing too much time in a broken component - or, maybe I just never got the best grip of physics.
I was about ready to try just convex mesh colliders around my tires, and just abandon the idea of gripping physics altogether, but I'd love to hear suggestions to either address anything I've mentioned above, or just a more ideal package to move onto. I've glanced at packages like Vehicle Physics Pro, but I do want to be sure I'm getting something that makes sense.
Full disclosure: I'm in the middle of trying to make a game that feels incredibly similar to F-Zero, but with wheels.
Thanks in advance for any thoughts or suggestions you can provide.
(Maybe not an answer per se, but hopefully helpful.)
Note Unity also suggests to possibly give the car a constant downward force via script. It might be telling that such workarounds are officially given, one would think proper physics would, well, properly work without them.
There's some assets you might want to give a try generally:
One is the Unity Asset Store asset called Arcade Car Physics, and it's free. I've tried it and it works (but not sure if it works for your needs). It's using Unity's native Wheel Collider plus extra scripts.
Another is the Arcade Car Physics github project. It has nice plane stabilization and more, and works well. It's not using the native Wheel Collider.
Then there's this asset called Vehicle Physics. Instead of native Wheel Colliders, they've create a fully custom wheel system so that it would be more physically workable. The asset is not free, but they offer a free demo executable where you can drive around different vehicles, and that works quite well. (I haven't yet bought this asset myself.) As a downside, some reviews mention there's some complexity in setting this up (and I suppose future support for this custom Wheel Collider hinges on the company continuing to exist).
Good luck!
Im trying to make a road in unity3d with blender, but when i try to make the piecing together i get ugly seems where the roads come together..
as of now my road is just a plane, should i make this to be a full box instead?
This is the seam:
And this is my model:
EDIT:
I managed to fix my problem by turning all my planes into boxes..
like this:
Your images are so small it is hard to understand issue from them, anyway as i understand your moddel's edge's are seem weird right?
Did you try to look them after the compile, editor scene show much more ugly because it needs to be fast but after compiling and playing it look much more nice.
And also you can make some post processing to get better quality.
I think i could not manage to tell in the best way but i hope it can help you...
Hey guys I'm pretty new to programming in general, I have searched and learnt as much as I can but I have no idea how to go about doing this
Essentially its like a rope that extends in the direction of a touch, but the starting location can change (and likely will). The rope itself is an array of sprites (unless thats a bad idea?). So far I can draw the line etc, and I have a clue about moving the start location but I do not know how I would:
Move the starting location without moving the entire line of sprites
Moving the line of sprites in such a way to follow a curve
Retract the line of sprites, although I imagine it would be the reverse process for moving it forward and so not too difficult if I can understand how to do the first part.
So far I know about bezier curves, vrope and have googled every search term I could think of but still dont quite know what to do.
Any help would be greatly appreciated.