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 kurotatsu · Jul 04, 2012 at 06:19 AM · teleporthangledge

Script assistance ledge hang teleporting/Added video.

Here's the scenerio: My character has an empty parented to him(above his head and a little in front of him) which I'm trying to use for him to teleport to in his climbup function. His ledge hang works fine and he does indeed teleport as I intended except the character is teleporting relative to the empty's position to the parent, instead of it's own world position.

 function Climbup() {
 
 player_pos.transform.position = ledgeteleport.transform.position;
 
 Invoke( "Climbingup", .3 );
 
 player.animation[climbup.name].speed = 3;
 
 player.animation.Play(climbup.name);
 
 
 }
 
 
 function Climbingup(){
 
 ledged = false;
 
 player.GetComponent ("kuro_mouselook").enabled = true;
 
 player.GetComponent ("kuro_movement2").enabled = true;
 
 player.GetComponent ("push_stuffscript").enabled = true;
 
 player.GetComponent ("PlayerAtk").enabled = true;
 
 audio.PlayOneShot(jumpSound, 1);
 
 
 }

I've tried many variations of transform.localPosition, transform.position, transform.TransformPoint(0, 0, 0), ect.

I know I'm working along the right lines, but this has been giving me fit's for about a week now, and I thought it was time to let someone else take a crack at it.

Thanks to those who take the time to assist.

Edit:

Ok so here's the video where I'm trying to debug my ledge climb. You'll notice when my character jumps his ray that shoots from an empty parented to his main character and the ray moves while in mid jump causing him to grab the ledge at wrong spots and when my character teleports his main transform to another empty parented to him he ends up going through the geometry.

As he changes I toggle the ledge detector on and off as well as his movement script, yet when you press the climb key he seem to keep his velocity and shoots forward as well.

Any help would be aprecciated.

If embed link doesn't show here's the link to the video: here

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by whydoidoit · Jul 04, 2012 at 06:22 AM

Well

  player_pos.transform.position = ledgeteleport.transform.position;

Will move the player to the location of the ledgeteleport object.

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 kurotatsu · Jul 04, 2012 at 06:55 AM 0
Share

That's what I originally was using, and you're correct it does work part of the time, and sometimes my character teleports through the floor when I do it. and sometimes he teleports into the walls box collider.

$$anonymous$$aybe the bug is somewhere else then, like when my character is in his hang state, or he's colliding with something.

Thanks for taking a look at it for me $$anonymous$$ike.:)

I'll keep trying. This method worked really well in blender, I wish there was a good 3rd person ledgehang tutorial to exa$$anonymous$$e.

avatar image kurotatsu · Jul 08, 2012 at 07:21 PM 0
Share

Added video link in first post.

Ok so here's the video where I'm trying to debug my ledge climb. You'll notice when my character jumps his ray that shoots from an empty parented to his main character and the ray moves while in mid jump causing him to grab the ledge at wrong spots and when my character teleports his main transform to another empty parented to him he ends up going through the geometry.

As he changes I toggle the ledge detector on and off as well as his movement script, yet when you press the climb key he seem to keep his velocity and shoots forward as well.

Any help would be aprecciated.

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

Teleport enemy after player collides with an object? 0 Answers

Player Prefs saving position Script assistance. 2 Answers

how to add a sound to this script 3 Answers

Issue with my Teleport Script 1 Answer

NEWBIE - how to make move like a mario brothers 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