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 Guedez · Oct 07, 2012 at 06:05 PM · collisioncharacter controller

Moving 'platforms' not colliding with you

I got almost everything working with my character controller but I've hit a wall now.

The problem is, if a object moving in my direction (using built-in animation) and 'hits' me, it will go through me. but if i jump on it, i will collide normally.

Also, occasionally jumping on a rising platform causes me to fall through it

The character was mainly made by making a capsule and then Component->Character->FPS Input Controller. I modified the default character motor to make the jumping on walls thing, besides that i don't think i have made any other modification.

Anyone know what might be causing this or how to fix it? (if possible, without having to scrap the character motor)

Youtube video showing the issue (you might need to stop the video to be able to read the comments at the end): http://www.youtube.com/watch?v=G_zglbupI-E

Pastebin with the modified Character Motor class: http://pastebin.com/hfhDawgJ

Comment
Add comment · Show 3
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 Bgriley2 · Oct 07, 2012 at 07:31 PM 0
Share

So you are certain that the cube you were falling through (in the video) contained a box collider and you contained a capsule collider? If you do not contain these colliders in an object, this object may go directly through you. If both you and the cube have those colliders already (they probably would) try removing those components and replacing them again. $$anonymous$$aybe they contain some error. Also, make sure to check the green text in the error log. They might actually mean something. If you have tried everything that I just said and none of them worked, try removing the jump on wall script. It may have something to do with it.

avatar image Guedez · Oct 07, 2012 at 08:11 PM 0
Share

I could not replace the character controller collider, but i re added the box collider on the platform, unhappily it did nothing.

What is this 'green text' in the error log? I've only saw black, red or yellow so far

Removing the wall jumping script caused the error to occur even when i go head on against the moving wall =/

avatar image coAdjoint · Oct 07, 2012 at 09:39 PM 0
Share

From personal experience with box colliders, I've found them to be very unreliable. Even with slow moving objects I've found raycasting to be much better. If you can use raycasting to detect collisions I think you may be able to solve all your problems

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by ausiemick · Oct 07, 2012 at 08:56 PM

Too much code to read.. So I'm going to make guesses from what ive seen:

your move will work by changing a transform.. This is a bad idea as it will allow violation of the physics engine, to move a character (properly) in a physics engine you have to apply a force to it (lookup unity forces) apon applying a force through you w,a,s,d,space keys it hopefully shouldn't have any of the issues you described..

so yeah.. Use forces not transforms if physics is in use. Only use transform for things where you want to ignore physics

Comment
Add comment · Show 2 · 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 Guedez · Oct 07, 2012 at 09:22 PM 0
Share

well, i am using the default character controller(and character motor), that does a '.$$anonymous$$ove' to move, that as far as i understood it's a modification on the transform checking if there was collision, and not moving if there was.

it seems everything is pointing to 'scrap all of what you did on character motor and make your own character controller using physics' =/

avatar image ausiemick · Oct 08, 2012 at 05:14 AM 0
Share

Haha, Only reason why I'm answering questions on this forum is because I asked one myself (and I feel bad if I don't put in 3x as much as I take out) I personally hate engines.. I like having full source access so If I use code I know fully 100% what it does... Too bad my assignment required me to use unity :P

But yeah.. Where ever theres a simple basic of a physics engine, as such as add force, you should always choose that as it's a basic engine feature so it's unlikely theres any code attached to it that will not act as intended.

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

A Character Controller with another shape. 0 Answers

colliding characters and meshes 0 Answers

Controller area of collision/contact 0 Answers

Not colliding with a box collider? 2 Answers

Character Controller giving false 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