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 Drum · Mar 31, 2011 at 10:02 AM · terrainitweenuneven

Question about iTween Uneven Terrain example.

Hi,

I'm somewhat baffled by my attempts to understand the iTween uneven terrain example. The example scene (for Javascript) works fine, but when I attempt to recreate the behaviour in a scene of my own it doesn't work. I've copied all the elements of the example scene component for component, I have the Puppeteer script in an empty gameobject, I have told it to use my character and arrow objects, and I have placed iTween itself in a Plugins folder in my project view.

On running the scene, first the Arrow object doesn't track my mouse movements as it does in the example. If I click anywhere then the Character object moves to the position of the Arrow object (which remains where it was placed in the scene view), but does so almost instantly, with no nice smooth movement in between as in the example.

I have no idea what I might be missing; I created a simple project and scene to test this and everything looks exactly the same as the example scene.

Can anyone help me with this?

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 Justin Warner · Mar 31, 2011 at 12:25 PM 0
Share

I really don't know, always wondered too... An idea I've had though, is give the moving object a rigid body, then just move it across the bottom-most part of the ground... The physics would handle the up and down then? And then I'd assume you'd have to go by the speed, not time... If this works, comment back, if not, if you find a solution, post please =).

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Drum · Apr 01, 2011 at 01:35 PM

Ok, I've prodded this a bit more and I've found what i was overlooking. Nothing to do with iTween in fact, but the figures in the puppeteer script for the raycasting are set for a terrain/object of the size in the example (50x50) where I was trying to use the same script on a much larger area. So, a line which read:

Physics.Raycast (cameraRay.origin,cameraRay.direction,hit, 50);

I changed to:

Physics.Raycast (cameraRay.origin,cameraRay.direction,hit, 500);

and it started working! :)

I also tweaked the time figures for the actual iTween call so that it looked better over the greater distance.

Sorry for the confusion, but I have learned quite a lot by solving this (mostly to read the documentation for EVERYTHING, not just what I think is giving the problem).

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 pixelplacement · Mar 31, 2011 at 09:25 PM

I can't recall everything I put into that example but one thing to look for is to make sure the object that is going to be riding along your terrain is in a layer that is being ignored by raycast otherwise the system will never be able to read the surface for a successful scan of the terrain and will instead think your object is the ground. Make sense?

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 Drum · Mar 31, 2011 at 10:14 PM 0
Share

Yes, the moving character is in a layer called 'ignore raycast'. I think the reason I am confused is because there is so very little in that scene. A couple of gameobjects, a mesh terrain, and an empty gameobject to hold the puppeteer script, and that's basically it!

When I have more time over the weekend I am going to try importing the assets from the example one by one in to a new project. At some point it has to work doesn't it?

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

No one has followed this question yet.

Related Questions

NPCs following an uneven floor... 0 Answers

Make a simple tree 1 Answer

iTween - Rotation Add get's uneven after several rotations 2 Answers

iTweenPath auto keep on terrain 1 Answer

what is the easiest way to do a moving car on uneven terrain 1 Answer


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