Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 qwerty2jam · May 23, 2011 at 11:19 AM · movementfirst-person

Vaulting Over Ledges

Hey all,

Im sure what im looking for is fairly simple but im stuffed if I know how to do it...I am fairly new to coding. Oh and can any scripts please be in javascript. I am also only using unity basic.

Now I want to edit the firstpersoncontroller so that when I run up to a wall holding a certain button and make contact with it I 'vault' over it. This would give the player a small boost of speed (brought back to normal by friction). Oh and the character needs to go up and over the wall (small jump action?)

It'll probably be a box collider with a trigger event that I attach to walls you can 'vault'.

Any help would be greately appreciated.

Regards,

Riley Morse

Comment
Add comment · Show 1
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 qwerty2jam · May 23, 2011 at 11:43 PM 0
Share

Thanks $$anonymous$$eltdown that after some research last night that was the impression I was left with (or using the extraforce on the jump in some way).

Probem is i don't know how to apply it to the allready existing firstpersoncontroller. Any tips on doing that? or a tutorial I can read?

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by demize2010 · May 23, 2011 at 11:46 AM

Hey man this is possibly more complicated then you think.

You will need a character model with a vault animation and possibly a compund collider depending on how you do this. The compound collider is the methrod we used as then clearing the object was purley animation based. You will need a custom character motor / controller which uses a rigidbody for this to work.

I think you can roughly get the result you want using the stock character controller by adding an upwards force/transition and playing the vault animation. You may have to set the capsule collider to run down the z-axis as well depending on your animation.

Without a HumanIK solution you're going to struggle to get really, really good looking results but you can fake quite a bit if you're clever.

Comment
Add comment · 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
0

Answer by Meltdown · May 23, 2011 at 12:22 PM

transform.position does not affect gravity/momentum.

I'd suggest using rigidbody.AddForce to do what you want to do. I assume your camera is your player since it is a first person game. Simply add the force to your camera in the direction you want the player to go to vault the wall.

Comment
Add comment · 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

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Making a bubble level (not a game but work tool) 1 Answer

First person capabilities 1 Answer

Better First Person Movement? 1 Answer

How can I make the Unity Standard Asset plane move in a scripted manner? 1 Answer

Screen jitters when looking around as the Rigidbody moves 3 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