Tutorial for steering behvior : Path following - iphone

I am working on a car racing game. I am almost done with prototype, but one thing.I am unable to add opponent cars. I searched for steering behaviors, I found a cool tutorial for Wandering. But couldn't find much useful on path following.
I found this link, but dint help me understand much.
Does anyone help me with some good tutorial for steering behaviors, which would help me grasp the basic concepts..?

This is non-trivial. Cars don't just follow a path, unless you want them to behave unrealistically. What you need is an AI driver. A good driving AI checks what's in front of it and then makes decisions to steer more or less in one direction, or brake or step on the gas.
This article covers some of the basics.
For the simplest solution I suggest a waypoint AI where the car just tries to head to the next waypoint of a predetermined path laid out by you. Depending on the angle between the past, the current and the next waypoint the AI can decide how much to steer and whether to step on the brakes to make the turn. You need to be sure that the AI actually does recognize reaching a waypoint by checking if the car is in a reasonable range. The distance between two waypoints must be greater than this range, otherwise the AI is prone to skipping ahead or possibly even turning back.

Related

3d Modeling - How do I make a 3d model that’s complex?

So, I’m attempting to create a 3d model of a bow (and arrow). I have some experience with making 3d models but nothing this complicated. I’ve created the 2d sketch of it and then extruded it to make it 3d, but I can’t figure out how to round the edges to make the bow circular rather than squarish. I’ve tried freeCAD, but the fillet causes the part to fail, and I’ve found no good alternatives that don’t cost me an arm and a leg.
Am I going about this totally wrong? Looking for some guidance or recommended references. Please excuse any ignorance on the topic I might be displaying here in asking this question.
This is a very broad question, and I would suggest first going over some tutorials like this to get started (in case you are interested in learning the software).
In case you just want the model for the bow and arrow, I'm positive you can find a whole bunch of them online (on sites like free3d.com or turbosquid etc.)

I want to make a small co-op 3D RPG. Where do I begin?

I know how to program although I haven't done much in C# yet. But I understand every code snippet I read. I mostly script at my job. I have little to no experience in graphical design or animations.
The only thing I have done so far in Unity 3D is the ball rolling tutorial.
I have some questions though as I have a hard time understanding where I should begin. I know co-op 3D RPG is a project with a HUGE scope, but this is what I would like to accomplish to begin with:
Mini world (half the size of a WoW zone)
Populate world with terrain, trees and some buildings. Maybe a cave.
Have a playable character that can move around and interact with some objects.
Could anyone guide me into the right direction? What documentation should I read? Are there any RPG packs or plugins that can help me achieve this? Any nice tutorials you know of?
If 3D is too complicated to start with, I'm also willing to try an isometric game.
PS: Are there any free (or reasonably priced) HD asset packs that include animations? Or will I have to provide those myself as well?
Co-Op RPG's are quite large; Infact most people have tools that would help this speed up production; Although you're asking where to start. Most of my programming knowledge comes from theory and pretty basic knowledge; But I have an idea on where you should start!
A big factor on Co-Op is well.... Of-course CO-OP so something you should play around with first is data and how it's stored but even though you have knowledge of this factor Unity has a good way of storing it from Host to Client!
https://docs.unity3d.com/Manual/UNetStateSync.html?_ga=2.98238303.1333003911.1509902124-1740889112.1506544791
Another factor of -Co-Op is the dynamic spawning that is going to be pretty heavy although their are quite a few ways of doing this I'm sure their are plenty of correct as-well as incorrect ways of doing it!
Personally I would develop a database and call-Events with SQLite though this would be a heavy and complex job to do correctly and efficiently
but unity3d has UNetCustomSpawning documentation that seems to work pretty well for it's inteded use although it takes some heavy tinkering to get right so I would suggest once you get synchronization done you should check out some Spawning
https://docs.unity3d.com/Manual/UNetCustomSpawning.html
With Every Co-Op Action it must be handled and heres how!
https://docs.unity3d.com/Manual/UNetActions.html
How about the actual connection?
https://docs.unity3d.com/Manual/UNetDiscovery.html
Although reading alot of this may help; I would suggest rading through this and giving it a shot.
https://docs.unity3d.com/Manual/UNetSetup.html
and if you find no help or it's doing you some trouble
https://unity3d.com/learn/tutorials/s/tanks-tutorial
You may hear about "Tanks", alot though I personally am quite stubborn so I couldn't bear to look into it untill I did just earlier this month; It shows a correct way of doing things from Shooting, to spawning, and may other things.
I am un-certain this is a good or bad answer for you as this I believe is quite a personal question but as their are about a thousand and a thousand more ways of doing this I think what I have shown is a great way of starting just to get an idea of how the ball should start rolling!
-Thanks!

Hololens-SpatialMapping (Unity3D)

I'm actually doing a project with the Hololens of Microsoft. The problem is that the Hololens memory is bad, so i can only make a spatialmapping of a room and not of a building because he can't remember all the building. I had an idea, maybe a can create more object and assemble them ? But no one talk about this... Do you think it's possible ?
Thanks for reading me.
Y.P
Since you don’t have a compass, you could establish some convention to help. For example, you could start the scanning by giving a voice command (and stop it by another one), and decide to only start scanning when you’re facing north, for example. Then it would be easy to know the orientation of each room. What may be harder is to get the angle exactly right. Your head might be off by a few degrees and you may have to work some “magic” (post processing) to correct it.
Or placing QR codes on a wall (printer paper + scotch tape) and using something like Vuforia can help you avoid this orientation problem altogether (you would get the QR code’s orientation which would match that of the wall).
You can also simplify the scanned mesh and convert it to planes. That way you can remember simpler objects instead of the raw spatial mapping mesh. (Search for the SurfaceToPlanes script in the Holographic Academy tutorials).
Scanning, the first layer, as in HoloLens trying to reason about the environment is an unstoppable process. There is no API for starting or stopping it. And that process also does slowly consume more and more memory as far as I know. The only thing you can do is deleting space (aka deleting holograms) or covering the sensors. But that's OS/hardware level, not app level, which you presumably want.
Layer two, what you are you probably talking about, is starting and stopping the spatial reconstruction process, where that raw spatial data is processed into a low-poly mesh (aka spatial mapping). This process can be started or stopped. For example through Unity's SpatialMappingCollider and SpatialMappingRenderer components, if you use Unity.
Finally the third level is extracting some objects/segments from that spatial mapping mesh into primitives. Like that SurfaceToPlanes. That you can also fully control in terms of when.
There has been a great confusion, especially due to the a re-naming parties in MixedRealityToolkit (overuse of word Scanning) and Unity (SpatialAnchor to WorldAnchor etc.) and misleading tutorials using a lot of colloquialisms instead of crisp terminology.
Theory aside. If you want the HoloLens to think of your entire building as one continuous space in terms of the first layer, you're out of luck. It was designed for a living room and there is a lot of voodoo involved into making it work stable in facilities 30x30 meters. You probably want to rely on disjointed "islands" with specific detection anchors to identify where you are. Or rely on markers and coordinates relative to them.
Cheers

Tango Unity Object Recognition

I'm actually making a tango application using unity, but i have an hard time with this technology, especially with how to use the cloud point.
I want to be able to compare an object in the room with a library of model when i press it on the screen. For this i want to use the cloud point system. And i think that the best way to do this is to recognise the floor under the object that interest me and get all the point above it.
My problem is here, i don't know how ask unity to get that point cloud, and compare it with the model in my library.How do i know in the TangoPointCloudData which point get which index? Is it possible to get a floor if there is an object on it?
I know it's a lot of question, and it's not the more precise thing i could give you, but i hope you will find a way to answer me.
Thanks.

Check for millions of collisions?

I'm building a solution to fit a number of objects most efficiently into a box. I hope to implement more efficient algorithms soon, but to start out with I'm going to use the brute force method, checking every possible position. This is fine for now since the box is small, with a very few number of items. Later, the complexity will grow.
I'm using Unity to allow the user to see how the items ultimately fit in the box. My initial thought was to also use Unity's physics and collision detection to implement the best fit algorithm; but, with a huge potential number of locations and positions to check, is this a bad approach? Am I much better off running my algorithm in a data structure instead? A 10x10x10 box with even three 1x1x1 objects have almost a billion possible positions...
I'm new to Unity so any advice is welcome; thanks!
Update: right, so this problem is definitely in the bin-packing set of problems, which I know is NP hard. I'm assuming a rectangular box, filled with rectangular box-shaped items of random dimensions.
My question is...
My question is: given my particular algorithm, when we ask, "is there currently something in this x,y,z space?" would it be more efficient to figure that out via code, or to use Unity objects with collision-detection.
Based on the answers I've seen, I can see using Unity would be profoundly inefficient.
If you LITERALLY want to know:
"is there currently something in this x,y,z space?"
the best possible way to do that, is to simply use Unity's engine. So, you trivially check the AABB to see if a point is inside it (or perhaps just check for intersection). You can use one of many
I understand that the question "is there currently something in this x,y,z space?" is or could be one important part of whatever solution you are planning. And indeed the best way to do that is to let Unity's engine do that. It's absolutely impossible you or I could write anything as efficient -- to begin with it comes right off the quaternion cloud in the GPU.
That is the actual answer to what you have now stated is your specific question.
Now regarding the more general issue, which I first fully explained when that was the question you were asking :)
Here are some of my thoughts on trivial "box packing" algorithms in 2D, at the level useful in video games.
https://stackoverflow.com/a/35228592/294884
Regarding 3D "box packing" it's absolutely impossible to offer any guidance unless you include a screen shot of what you are trying to do and fully explain the shapes and constraints involved.
If you are a matheatician and looking for the latest in algorithmic thinking on the matter, just google something like "3d box packing algorithm"
example , example
Again, readers here have utterly no clue what shapes/etc you are dealing with, so please click Edit and explain!
Note too that sphere packing is a really fascinating scientific problem, if that's what you are talking about:
https://en.wikipedia.org/wiki/Close-packing_of_equal_spheres