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
0
Question by theredace · Jan 08, 2015 at 03:27 PM · collisionpathfindingisometric

Isometric character collision

I'm prototyping a base mechanic of a 3/4 isometric environment with click-to-move character movement (i.e. Diablo). I've got the barebones of it working and I'm trying to figure out the collision with environmental objects. At the moment I'm using Vector3.MoveTowards to move my character, so collision with objects doesn't work as the character just passes straight through it (the collision works any other time, just not when I'm using Vector3.MoveTowards).

I saw some folks recommend using a character controller instead, which I tried, but the collision still doesn't work. I've also thought about using Unity's pathfinding to handle this (and also takes care of the A* pathfinding I'll need) but as my environments get big I don't want to constantly have to be "baking" the collision mesh with every tiny change I make.

Any recommendations for a better direction to go with this? Is there a different method of moving my character that will result in collisions working correctly?

Comment
Add comment · Show 4
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 Scribe · Jan 08, 2015 at 05:27 PM 1
Share

if you are going to have path-finding, do you even need collisions. Normally the path given will never walk into an obstacle anyway, that's sort of the point of pathfinding! :D

avatar image Owen-Reynolds · Jan 08, 2015 at 05:43 PM 0
Share

Collision does work with a characterController, if you move the way it wants, using charController.$$anonymous$$ove.

$$anonymous$$oving by directly changing position ($$anonymous$$oveTowards, translate) will always ignore collisions, no matter if you have a charControllor or rigidbody (a rigidbody often says "why am I slightly in a wall!!," and pops itself out. But a lucky $$anonymous$$oveTowards can still drive it through a wall.)

avatar image theredace · Jan 08, 2015 at 05:43 PM 0
Share

I hadn't thought about that. Good point. I had been considering these separate necessary systems. I suppose I'll just move forward with pathfinding. Thanks!

avatar image theredace · Jan 08, 2015 at 05:45 PM 0
Share

I would mark Scribe's comment as the best answer, but it's not letting me. :(

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by Anxo · Jan 08, 2015 at 04:27 PM

if you have a rigidbody on your character, you can use rigidbody.velocity to control your character's direction while respecting collisions.

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 theredace · Jan 08, 2015 at 05:23 PM 0
Share

Thanks. I'll give that a try.

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

28 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 avatar image avatar image avatar image avatar image 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

How do I make objects disappear as they are touched? 1 Answer

How to make whole navmesh agent avoid carves rather then center of it? 0 Answers

2D Isometric Rigid Body Collision Resolution (collide and side) Not working 0 Answers

Have falling object exit from a collider after collision? 2 Answers

Ideas on pathfinding and collisions 0 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