I was wondering what best approach to take when trying to implement pathfinding but without using a grid.
In this example, the player is a able to place road tiles on a grid, but I only want to pathfind the placed roads (no need to compute for the whole map).
I've tried a couple things but with no luck.
Any help would be appreciated.
Thanks in advance.
I think you are looking for A* algorithm. There are also other ways to do this, but most of them are based on graphs, including Unity NavMesh.
There is amazing site with interactive examples and implementation guide, for sure it will be helpful, whether you want to implement this yourself or just understand how it works:
https://www.redblobgames.com/pathfinding/a-star/introduction.html
Related
I want different images to be displayed from different point of view. For the whole concept explaination please look at the images. they explain my idea/query!
As in the first image you see that there are three people at different angle looking at the monitor. Now i want the webcam to track the eyes and show the particular defined image to the user> For example: If user is at 45 degree angle then show image1.png
Depending upon the user's prespective of watching. The computer should show the image.
(the lady is the game character for representation purpose)
Can you please guide me on what steps can be taken to accomplish this? Is there any plugin available for unity that tracks faces? Please guide me
Also thanks for the compliments on my sketching skills xD
Stackoverflow is not really meant to recommend plugins, since the choice is usually opinion based so there is no exact answer.
That being said, on of the most common used API for computer vision (meaning interpreting images, including face recognition) is OpenCV, so that could be a good start for you to look at that.
And fortunately for you, there is a Unity plugin for OpenCV
It is too broad to give you more details about how it works here. You should try to make it work, and if you have a problem with your code, open a new question with the code portion that you struggle with.
PS: nice sketching skills
Perhaps easier option would be to use Kinect
(trying to detect face or eyes from that far might be shaky?)
With Kinect you can get skeletons for multiple people, and getting the angle between target and those kinect avatars would be easy.
If there is no space to put kinect in good position,
could consider placing it on the ceiling above (and then use depth data only to detect people in its view)
Only issue is that apparently Microsoft has stopped Windows kinect support,
so you would need to find 2nd hand versions.. (Unity Asset store still has some kinect plugins and examples available)
https://www.polygon.com/2018/1/2/16842072/xbox-one-kinect-adapter-out-of-stock-production-ended
Or look for kinect alternatives that work with unity, try RealSense cameras:
https://www.intel.sg/content/www/xa/en/architecture-and-technology/realsense-overview.html
I just started using WPF and searched on how to do animations, there is many good tutorials but i can't seem to find the specific thing i need.
My goal is to create a small circle to start at a location and when a timer ticks move the circle smoothly towards another point(within 1 second). There is going to be new starting points and target points each tick.
As i said im fairly new to WPF so XAML is a new area for me, so i don't know how to animate the movement or if i should draw the circle or use an image. I don't even know if this is hard or an easy thing to do.
For reference im trying to make it look like the projectiles in this link:
http://map.norsecorp.com/#/
Would appreciate any help or any google search words i should use.
/ Alexander
If you are trying to work with animations, WPF isn't the right tool for you.
I have done many projects in this direction in the past and i cant recommend WPF. You need to work with multiple threads and your code is getting messy very soon. WPF is optimized for buisness solutions not for drawing circles. You can use Unity 3D. Its easy to learn and there are many examples out there.
I am trying to figure out a way to digitally map an image of a stained glass window. Between and around every piece of glass is a line of lead solder. What I'm thinking would be the best way to go about this would be to map the image based on the range of HSL or HSI values of the soldering material, such that each piece of glass would be its own zone, with its own information and click function.
I'm trying to make this a desktop application using C#, but could probably use html/javascript if that would be easier. I have been searching for some time to try and figure out a good way to accomplish this, but I'm having a hard time figuring it out.
Does anyone have any pointers on how I might go about doing this? I'm sorry if this question seems vague; if further clarification is needed, please comment on it and I will try to be clearer if necessary.
I don't have enough reputation to post a picture, but look at these for an idea:
http://rootsofknowledge.tc.uvu.edu/Gallery
I have had a little look, but don't want to do too much in case I am barking up the wrong tree!
I like to use ImageMagick, available for free with C/C++, Perl, PHP bindings and on the command line in most Linux distros. It is here.
I started with this image:
and tried a little blurring to make it less sensitive to tonal changes in the glass, followed by a Canny Edge detector and got this:
The command I used was this:
convert glass.jpg -blur 0x2 -canny 0x1+5%+10% edges.jpg
Obviously there is loads more to do, but it is maybe a start... and maybe others will add their expertise now we have a starting point....
I want to draw a graph like the one i've attached here:
I dont wanna re invent the wheel and start to draw circles and so on, so i googled for libraries and what i found is Graph#. Unfortunately there is no documentation/tutorial, so i'm a little confused that is this what i need or not!
What I need is to be able to choose colors for vertexes, set font and size, thickness of edges and distance from the root. Anyone can help me? Any example of graph#? any other library?
Any help is appreciated, thanks
You can achieve this using the GraphX library based on Graph# (http://graphx.codeplex.com)
Although some modifications will be needed to do so such as templates change or algorithm customizations. If you have any questions please feel free to ask in the Discussions page on the site. Cheers.
i have been searching for long in order to find how i can place a sphere/cube around my playfield so ill have an effect similar to sky. I have seen SkySpheres/Boxes but couldnt implement them . Im looking for a rather simple solution since my play field is really small and i just need something to replace the Clear(Color.Black) .I dont care about collision i just need it to be there with a texture on . Thanks !
You should take a look at Riemers XNA Tutorial
HERE is the post on the skybox.