Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
1
Question by code-blep · Dec 09, 2012 at 09:09 PM · vector3pathfindingnodesroute

Do I need A* Pathfinding for my simple needs?

Hi,

I need to calculate the shortest route around the edge of a wireframe cube. The cube has 14 nodes in total. One for each corner and each side of the cube has a node in the middle.

The wireframe cube is actually a perimeter for a solid cube, so I need to avoid any routes that would try to pass through the solid cube in the middle. Here is an image of the cube:

alt text

I already have the cube setup and an array list of the Vector3 values for each node.

So is this a job for A*? Or does anyone have a suggestion on how to go about this?

Thanks

Paul

example-cube.png (14.9 kB)
Comment
Add comment · Show 7
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · Dec 10, 2012 at 08:40 AM 0
Share

huh?

looking ONLY AT the "white" larger cube. is it true that you ONLY want to travel on the SURFACE of that larger "white" cube?

Yeah?

you talk about not touching the inner dark cube (I think). But ANY connection of the green dots -- other than on the surface of the larger "white" cube -- does touch the inner dark cube.

So - the inner cube is irrelevant, you just want to travel on the outer "white" cube SURFACE - is that correct?

or, do you mean that: the "CENTRAL" green points on the outer cube, may, connect directly to the other "CENTRAL" green points on the outer cube. (but not the through-the-middle connection, only the adjacent four in each case)

???

in all events, you can easiyl WRITE OUT THE TOTAL SOLUTION for the shortest path in such a simple set. then just follow that in code.

avatar image CodeMasterMike · Dec 10, 2012 at 08:55 AM 0
Share

@Fattie

I think he wants to move between the green points, avoiding collision with the Cube inside the wireframe cube.

Something like the computer Hacking part of Bionic Commando Rearmed.

If not, then my answer is completely wrong :-)

avatar image code-blep · Dec 10, 2012 at 09:34 AM 0
Share

lol guys! You are correct about what my goal is Code$$anonymous$$aster$$anonymous$$ike. Looks like I am having to jump in feet first into A star, probably by using a component. I looked at the wikipedia page for A star and quite frankly, it scared the crap out of me ;)

@Fattie: Any suggestions now that the fog has cleared? ;)

It still seems like overkill for what on the surface seems like a simple task, but as always with game dev, there is always more going on behind the scenes than first realised. Every game I look at these days I find myself asking what is REALLY going on behind the scenes ;)

avatar image Fattie · Dec 10, 2012 at 09:35 AM 0
Share

damn, I don't know that game !!!

i'm pretty sure he can just write out all the solutions. I think there's only bout six categories...

if you're on a point and want to go to a point, it's totally trivial.

point to midthing, three are completely trivial and three are trivial

midthing to point, four are extremely trivial and four are trivial !!!

midthing to midthing, all totally trivial

avatar image Fattie · Dec 10, 2012 at 09:36 AM 0
Share

@UFO ... NOTHING is easy in program$$anonymous$$g. the simplest program$$anonymous$$g is harder than anything else, ever, attempted by $$anonymous$$an.

so first, congratulate yourself!

secondly I think I have outlined the six categories in the previous comment, go get it !

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by CodeMasterMike · Dec 10, 2012 at 08:27 AM

My idea would be to use raycast to check for collisions.

Say that you are at Point A, and you want to go directly in a straight line to point B, do a Raycast from Point A to the direction towards Point B. If the ray collides with the Cube, then you can't go that way and need to try another way.

But if you would want to move in a more complex way, by reaching your goal by avoiding the cube but still come to Point B eventually, then you would be better off with using A*.

Good luck!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image code-blep · Dec 11, 2012 at 01:15 PM 0
Share

Thanks Code$$anonymous$$aster$$anonymous$$ike!

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

NavMeshAgent not calculating shortest route. 3 Answers

A* endless loop 0 Answers

iTween, moving to a node on a path. 1 Answer

Custom pathfinding and node-values 1 Answer

Help with a simple AI 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges