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
2
Question by madpuppet · Jul 13, 2012 at 05:12 PM · gameobjecttransform

Can't skew a gameobject transform?

I'm trying to port an existing game from a custom iOS engine to unity.

However, all the objects in the game use a little bobby animation that relies on skewing the objectToWorld matrix. Bascially, the y axis bobs up and down, and a little left and right on a little sine wave, while the x and z axis remain static.

I can't see how to do this in Unity with its limited transform system only supporting rotate, translate and scale.

The best solution I have come up with so far is to do the skewing in the vertex shader, and handling my own attachment code for child gameObjects (like gun turrets or particle systems). That is, I can't make the a particle system a child of the parent, since the pivot won't animate with the parent's skewing.

Perhaps I've missed something and there really is a way to create a skew'd transform??

Comment
Add comment · Show 6
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 goo-muffin · Jul 13, 2012 at 05:18 PM 0
Share

Why don't you use iTween?

avatar image madpuppet · Jul 13, 2012 at 05:22 PM 0
Share

I can't see anything to suggest that iTween can skew a transform

avatar image whydoidoit · Jul 13, 2012 at 05:24 PM 0
Share

It can't skew it - only modifying the mesh (or doing it in the shader) will give you the effect - as you rightly say, that doesn't solve your problem with the particle system.

avatar image whydoidoit · Jul 13, 2012 at 05:25 PM 0
Share

Perhaps $$anonymous$$egafiers? Still not sure it's going to help with the particles.

avatar image madpuppet · Jul 13, 2012 at 05:37 PM 0
Share

that looks pretty impressive, but overkill for what I want, and pretty sure that it won't help with child attachments. I have the shader version working fine, so really just wanted to know if there was an alternative that worked with child attachments.

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by whydoidoit · Jul 13, 2012 at 05:21 PM

From everything I can see it is not possible to create a matrix which is applied by Unity. The matrix that you can access in the transform is calculated from the basic transform elements meaning that you can't apply shear/skew.

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 madpuppet · Jul 13, 2012 at 05:27 PM 0
Share

thanks. I just wanted to get some confirmation I wasn't going crazy. sigh. I might try and see how the game looks with some bouncy scaling rather than skewing.

avatar image
0

Answer by Piflik · Jul 13, 2012 at 05:43 PM

While you probably can't skew objects directly in Unity, it would be possible to import animated objects. It's more of a workaround, than a solution, though.

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 madpuppet · Jul 13, 2012 at 05:51 PM 0
Share

thanks for the suggestion, though the shader solution I have works fine as a workaround. I haven't touched Unity's animation pipeline yet. Even my models are dynamically generated at runtime from scripts.

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

8 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Instantiate rigidbody, transform or gameobject? 1 Answer

I want to move a cube with rotation but I find this problem 1 Answer

Is there any way to convert Collision to a Gameobject or Transform? 1 Answer

Difference between Vector3, Transform and GameObject 2 Answers

How to move a gameObject without affecting its childrens' positions? 2 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