Search Unity

  1. Unity 2017.2 beta is now available for download.
    Dismiss Notice
  2. Unity 2017.1 is now released.
    Dismiss Notice
  3. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  4. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  5. Help us improve the editor usability and artist workflows. Join our discussion to provide your feedback.
    Dismiss Notice

Jelly Mesh - Soft body style physics for 3D meshes

Discussion in 'Assets and Asset Store' started by mrsquare, Mar 3, 2014.

  1. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hi folks,

    I'm pleased to announce the release of Jelly Mesh on the Unity Asset Store :)

    Web Player Demo


    Jelly Mesh is a soft-body physics system for Unity compatible meshes. It allows you to quickly and easily convert static meshes into ones that will bounce, stretch and deform, naturally reacting to physical forces in your game.

    * Works with any Unity compatible mesh.
    * Supports both 2D and 3D physics systems.
    * Simple to configure, but with in-depth configuration options to let you easily balance quality and performance.
    * Quickly create soft bodies with cube, sphere, pyramid and grid body configurations.
    * Convert any Jelly Mesh to 'Free' mode in order to directly move and scale rigid bodies in the Scene View.
    * 'Attach Point' system allows child objects to react to physics forces just like the main Jelly Mesh.
    * Full C# source code and example scene included.


    To create a Jelly Mesh, you simply create a Jelly Mesh GameObject, assign a mesh to it, and then hit play! Jelly Mesh works by creating a set of rigid bodies and colliders, attached by springs, the movement of which is then used to alter the positions of the mesh vertices. As the bodies stretch and distort, so does your mesh.

    Jelly Mesh come with numerous options to configure everything from the spring stiffness and mass of the bodies to the physical layout of the colliders - you can make things as bouncy or as rigid as you want.

    [​IMG]

    If you'd like to achieve a similar result with 2D sprites, check out my Jelly Sprites asset, which lets you create a similar effect with any Unity or 2D Toolkit sprite.

    As always, please feel free to reply in this thread or PM me if you have any questions :) I take pride in my post-sales support, and will always endeavour to help out with any queries or issues. Thanks!
     
  2. lazygunn

    lazygunn

    Joined:
    Jul 24, 2011
    Posts:
    2,749
    Hah this is great! Very cheesy question but how's mobile performance? Seems like something that would be very fun to make a game around

    How well would it work for say, using the system to make a 'proxy' set of springed objects to add to a much more complicated mesh? Mainly so you could add slightly springy softbody reactions in a mesh that was principally animated with bones?
     
  3. HeadTrip

    HeadTrip

    Joined:
    Apr 1, 2013
    Posts:
    418
    I'm really loving it so far! Thank you so much, it's one of those functionalities I really hoped to get in Unity for PC export.
    Even my first test was fun, took a skybox reflective ball and made it jelly like. Shooting it is so fun...
    This is going to really add to my creature behaviors.
    I have some questions
    - why do we assign a mesh to two locations?
    - does the physics stop if left alone? I notice good control using drag :). Hopefully this would help CPU
    - how would I add it with a falloff, say a tree with a static base?
    Thanks!
     
  4. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,137
    Fantastic !!! It's very funny to see all these 3D models bouncing and stretching in your demo scene.

    Now I don't have to convert my 3D blob to a 2D character. Great to be able to use my 3D blob with Jelly behaviour !!!

    I have tested the Primitives Pro with your plugin and it's nice too.

    Great job mrsquare...
    6R
     
  5. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hi all - totally forgot to subscribe to my own thread, oops!

    The performance is largely down to the complexity of the mesh, the number of physics bodies in the Jelly Mesh, and of course the number of Jelly Mesh objects in your scene. The code basically looks at each mesh vertex, works out its relative distance from all the physics bodies, and then assigns a weighting value to each physics body which, at runtime, determines how much its movement should influence that particular vertex. Therefore increasing the number of vertices or the number of physics bodies will increase the number of calculations that need to be done each frame.

    If you're running on mobile, I'd recommend sticking to simple, low-vertex density meshes where possible, and use one of the simpler body configuration types (pyramid or cube). I've only tested on my Nexus 7 tablet - the demo scene seemed to be getting about 20fps, but that's with about 6 meshes running simultaneously and not much consideration being given to the number of rigid bodies being used.

    I might be misunderstanding slightly, but I think that should be do-able. I'm using Jelly Sprites (similar concept, only in 2D) for a game that I'm working on, where I need the main character's body to occasionally wobble, but to otherwise be completely under the control of my own code. I basically have a Jelly Sprite positioned somewhere off-screen with a kinematic central point, which I occasionally 'poke' via code to make it wobble, and the wobble is translated to my character's sprite. By default, the code will update the Jelly Sprite to be at the same location as the physics bodies, but you can easily disable this and just control the position yourself.
     
    Last edited: Mar 6, 2014
  6. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    - You shouldn't need to assign it twice (I assume you're talking about the field in the 'Mesh Filter' component?) - if you just set it in the Jelly Mesh component's 'Mesh' field then other one should automatically update.

    - It should do, yeah, but will probably depend on how wobbly your Mesh is. If the bodies do completely stop moving, then the Jelly Mesh code should detect this and won't both updating the vertex positions, which will save on CPU time.

    - Sounds like you could use a pyramid-style configuration, and then set the bottom points to be kinematic (so you have a static base with a wobbly top). If you set it up as a pyramid initially and then click the 'Convert To Free Mode' button, then you can set which bodies are kinematic and which aren't.
     
  7. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Ah, good idea - I might buy a copy of this tonight and update the demo scene with some more interesting shapes :)
     
  8. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    A little demo/tutorial video is hopefully coming soon, by the way!
     
  9. feddarkk

    feddarkk

    Joined:
    Jun 6, 2013
    Posts:
    12
    Hi! Very cool plugin! I wonder is it possible to attach jelly mesh to any parent like a character?
     
  10. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Do you mean have a Jelly Mesh as a child object of another object?

    I think the best way would be to create a Jelly Mesh, set it to have a kinematic central point, and then create a little script that grabs the central point of the Jelly Mesh and moves it same position as the 'parent' each frame.
     
  11. feddarkk

    feddarkk

    Joined:
    Jun 6, 2013
    Posts:
    12
    Thanx for advice!
     
  12. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    Very interesting! I had passed over Jelly before because I thought it was only 2D. But this might work for me very well.
    Only one thing is missing I think - could we get something like a "hardness map" to limit the effect to only certain verts?
    This would be going on a skinned mesh, and I would only want certain parts to be driven by Jelly, the rest bone animation.
     
  13. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Interesting idea - theoretically it shouldn't be too hard to only apply the the Jelly effect to certain verts, Were you thinking you could eg. use the scene view to select individual vertices and mark them as Jelly/non Jelly?

    Worth pointing out that I've not actually tried this with a skinned mesh before - I'd have thought that it would work fine, but that's assuming there aren't any Unity issues with trying to manually set vertex positions on a skinned mesh.
     
  14. Hrothvitnir

    Hrothvitnir

    Joined:
    Apr 26, 2013
    Posts:
    109
    I was thinking more like an influence map - a texture let's say for simplicity's sake, black to white = 0.0 - 1.0, and maybe multiply that times the "change in position" for a given vertex. You could probably even use RGBA channels to let users specify different areas that might have different physics properties. Or something like that, lol. I don't know, I guess that might be a material property, which might not fit into the scope of your asset, but that's probably one of the easiest ways I could think of (I'm not much of a programmer).

    In editor... I know the Unity Skinned Cloth inspector has vertex selection and painting (at the bottom of this page) but I have no idea if something like that is doable.
     
  15. HeadTrip

    HeadTrip

    Joined:
    Apr 1, 2013
    Posts:
    418
    How about vertex colors we import on the mesh, an additional option. Maybe on a certain channel?
    I like the above idea as well
     
  16. Mr-Oliv

    Mr-Oliv

    Joined:
    Sep 14, 2012
    Posts:
    11
    Hi! Lovely asset! But I'm having one problem, if I check the box "Kinematic", the created ref point (in my case the "Central Ref Point") is still using gravity and not set to Kinematic. Or is there something I'm missing?

    cheers!
     
  17. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Apologies - this looks to be a bug when using the 'Free' body type.

    If you open up JellyMesh.cs, go to the UpdateRotationLock() function and change this line:

    Code (csharp):
    1.  
    2. centreRigidBody.isKinematic = m_CentralBodyKinematic;
    3.  
    to this:

    Code (csharp):
    1.  
    2. centreRigidBody.isKinematic = m_Style == PhysicsStyle.Free? m_FreeModeBodyKinematic[0] : m_CentralBodyKinematic;
    3.  
    There are two instances - one on line 798, and one on line 835, you'll need to change them both. Thanks for pointing that out, I'll roll it into the next update :)
     
  18. jgalvezpa

    jgalvezpa

    Joined:
    Dec 27, 2012
    Posts:
    36
    Hi hey do you know how can i make the jelly to be moving all the time, like movement of a real jelly but that never stop moving
     
  19. HeadTrip

    HeadTrip

    Joined:
    Apr 1, 2013
    Posts:
    418
    I would like to know if this is possible too!
     
  20. mushdevstudio

    mushdevstudio

    Joined:
    May 9, 2014
    Posts:
    19
    Hi - this is a great asset - thank you very much for sharing.

    If I use these 3D blobs as enemies - how could I make the eyes follow the main player?

    Also I can make the 3D blob chase my player but it is not direct because it keeps random rotating instead of locking on to main player - any idea how I could alter this behaviour?
     
  21. phoenixrising

    phoenixrising

    Joined:
    Aug 9, 2013
    Posts:
    55
    First, I need to say this is an amazing asset, and thank you.

    I would like your advice on the best way to achieve something similar to this?

    http://digital.hammacher.com/Items/79556/79556_1000x1000.jpg

    Am I supposed to choose a sphere, then pick a large number of colliders and then copy configuration to freemode and position each sphere center to where I want it?

    I am not sure I understand what the Body1..n values x,y,z,w represent?
     
  22. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,614
    How i missed this thread? :eek:

    @mrsquare
    Can i use your tool to make a deformable wheel/tire?
     
  23. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey - yeah, if you want to make a custom shape then that is probably the best way to achieve it. You can always add or remove points once you are in free mode if you find that you have too few/too many.

    The x, y, z values are the 3D coordinates of the Jelly Mesh colliders - if you tweak them then you should see the points move around in the scene view. The 'w' value is used to control the radius of colliders, so you can make them bigger or smaller.
     
  24. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Yeah, that should be do-able :) Check out the demo scene and there is a torus shape that is doing something pretty similar.
     
  25. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,614
    Thank for the reply.
     
  26. BitDemon-Games

    BitDemon-Games

    Joined:
    Jan 27, 2013
    Posts:
    9
    Hey, I just brought this and I'm having a problem with it. When I load the demo scene or create a jelly mesh and move around in the scene view I get this error
    But once I hit play its fine. Is there anything im missing?

    Thanks
     
  27. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey - nope, sorry, that was me breaking something in a recent update. It shouldn't cause any problems beyond the debug rendering not working, but if you update to Jelly Mesh v1.3 (which just got approved about half an hour ago) then it should be fixed. Let me know if you're still having issues after grabbing that :)
     
  28. BitDemon-Games

    BitDemon-Games

    Joined:
    Jan 27, 2013
    Posts:
    9
    Looks like everything is working, thanks.
     
  29. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,069
    Hi there,
    I have a simple jelly mesh object, cube. I have played with the settings a bit, just to get a feel. Seems nice. I attached a script that would allow me to translate the cube up, then drop it. However, it does not allow me to raise it off the floor.

    Why is that? Its like it is trying to each frame but cant.
     
  30. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey - it sounds like you need to move the Jelly Mesh reference points rather than the actual Jelly Mesh gameobject. The reference points are what define the position and deformation of the mesh - if you just move the mesh object then it'll instantly snap back to the position defined by the reference points on the next frame.

    In general, it's best to manipulate a Jelly Mesh using forces wherever possible, and the Jelly Mesh component has an AddForce function to do just that. If you do need to explicitly set the position though, there is also a helper function called SetPosition.
     
    Last edited: Jan 5, 2015
  31. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,069
    Ok great, so to use AddForce, what is the reference? rigidbody?
     
  32. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Nah, that function belongs to the Jelly Mesh component (but it's intended to work in the same way as the rigidbody AddForce function).

    So if your script is attached to the Jelly Mesh gameobject, you just need to do something like:

    Code (csharp):
    1.  
    2. GetComponent<JellyMesh>().AddForce(new Vector3(0, 10, 0), true);
    3.  
    which will apply an upwards force to the central reference point.
     
    Last edited: Jan 5, 2015
  33. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,069
    Awesome.
    Thanks!
     
  34. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,069
    Hi mrsquare,
    Sorry for asking these basics but I am in a bit of a rush a the moment and would love to just reference your reply. Cheers!!!

    1) The object is just collapsing pretty much. Which parameters are best for effecting the collapse, rigidity?

    2)Also how would I adjust the force point? So the force is applied to the top edge? Not the center.

    3) This code is not moving the object in any significant way.
    Code (csharp):
    1.  
    2.     // Update is called once per frame
    3.     void Update () {
    4.         if(up){
    5.             jelly.AddForce(vect, true);
    6.         }
    7.     }
    8.  
    Where up is a public bool and vect is a public vector3. Each I am toying with in the inspector with no results.


    4) How is the performace of Jelly Mesh on mobile?


    Again, sorry if these answers are obvious.
    Cheers!!!
     
  35. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    A combination of increasing 'Spring Stiffness' and reducing 'Mass' is probably your best bet. Or, alternatively, reduce the gravity in your scene.

    There is an AddForceAtPosition function to do just that :)

    That *should* be fine - have you tried sticking in some crazy values for the force and seeing what happens? Also, make sure that you don't have any collider/rigidbody components attached to the Jelly Mesh gameobject (they will interfere with the movement of the reference points), and that you don't have the Jelly Mesh component set to kinematic.

    I've not used it extensively on mobile, beyond the demo scene, but I've heard good things from users. At the end of the day, it's just using the standard Unity physics system so it's not doing anything hugely complex. If you ensure that you keep your meshes fairly low-poly and keep the number of physics bodies low, then that should help to keep the CPU cost down.
     
  36. Replik8tr

    Replik8tr

    Joined:
    Mar 2, 2014
    Posts:
    4
    I really like your asset. I am having a blast playing with the jellies!


    Feature request:

    Is there any way to have the jellies stick to their neighboring jellies when they collide? I need user placed jelly cubes to stick together.

    My attempts so far required a box collider. The collider messes with the jelly mesh.

    Could be a whole new asset; code named Peanut Butter.
     
  37. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey,

    You can listen out for the Jelly Mesh colliding with other objects by implementing the 'OnJellyCollisionEnter' function on any script attached to the Jelly Mesh gameobject.

    If the other object is another Jelly Mesh, you can then call AddAttachPoint() to stick them to one another (in the same way that eg. the yellow blobs in the demo scene are stuck together)
     
  38. Replik8tr

    Replik8tr

    Joined:
    Mar 2, 2014
    Posts:
    4
    Thanks.
     
  39. JohnHarrison

    JohnHarrison

    Joined:
    Feb 26, 2015
    Posts:
    1
    So i had a simple program where a ball moved around by rolling that moved with this

    function Update ()
    {
    var rotation : float = Input.GetAxis("Horizontal") * rotationSpeed;
    rotation *= Time.deltaTime;
    rigidbody.AddRelativeTorque (Vector3.back * rotation);
    if (Input.GetKey(KeyCode.W) && isGrounded())
    {
    rigidbody.velocity.y = jumpHeight;
    }
    }

    I have been trying to get a similar script to work with the JellyMesh but I cant even get the thing to move.

    void FixedUpate()
    {
    float moveHorizontal = Input.GetAxis("Horizontal");
    float moveVertical = Input.GetAxis("Vertical");

    Vector3 movement = new Vector3(moveHorizontal,moveVertical,0.0f);

    GetComponent<JellyMesh>().AddForce(movement *10 *Time.deltaTime,true);

    }
    }

    what do i need to do to get this thing to move?
     
    Last edited: Feb 26, 2015
  40. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey - I think your force is simply too small.

    I tried modifying the JellyMeshBlobBehaviour script in the demo scene to use the code above, and found that I needed to use a force scalar in the region of 10,000 to get one of the blobs to move.

    The exact value will depend on how many physics bodies you're using - the more bodies, the heavier the overall Jelly Mesh body will be, and the more force will be required to move it. Alternatively, you can set the Jelly Mesh 'Mass Type' to 'Global' in the inspector in order to keep the overall mass consistent regardless of the number of bodies. Be aware that you'll probably have to go through and retune all the spring stiffness values etc. if you modify that, as it'll suddenly become much much lighter.

    Also - minor point, but if you're running code inside FixedUpdate(), it's best to use Time.fixedDeltaTime instead of Time.deltaTime.
     
  41. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Quick note for anyone who may be using Jelly Mesh with Unity 5.0 already - the asset should be totally compatible, although the demo scene blobs probably won't be behaving 100% correctly. When I tested Jelly Mesh with the Unity 5 beta a while back, it seemed that the switch to PhysX 3.0 had altered the spring behaviour somewhat, so I just need to revisit the settings in the demo scene and tune the stiffness/mass values. Will try to get an updated build uploaded imminently :)
     
  42. renman3000

    renman3000

    Joined:
    Nov 7, 2011
    Posts:
    6,069
    Hi there,
    I am wondering if I could use this asset to somehow create a stem for a plant. On top the stem would be a cube jelly mesh. The overall effect would be a stem, weighted down a bit by a flower(cube), on top of it. The cube would bounce about a bit as the stem balances.


    :???
    :::DDD
     
  43. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey,

    Interesting idea. You could probably achieve an approximation of that, although it really depends on how accurate/realistic you're wanting it to be. Jelly Meshes are good at making objects squash/stretch/distort, but you'd have a harder time making one that properly bends in a manner like a plant stem. You best bet would probably be to create a pre-bent plant stem mesh, and then use a pyramid shaped Jelly Mesh to make the top part bounce around whilst keeping the base static.
     
  44. McGunn

    McGunn

    Joined:
    Aug 7, 2012
    Posts:
    21
    Hi. I am loving this! I am pretty new to Unity, but I have a few questions.
    I'm trying to make a 3D game with a jelly-like sphere that moves with torque. I have been messing around for many hours, but I can't get it to behave properly. The rotation doesn't translate into motion the way it would with a non-jellified rigid-body. It can stop moving completely while it's still rotating. I also can't seem to affect it with moving platforms.

    I based this whole experiment on the free rolling ball project: https://www.assetstore.unity3d.com/en/#!/content/1565

    I of course modified the code to make the ball controller add torque to the jellymesh, and removed the rigid-body.

    Is there any way that you can think of to achieve smooth rotational movement on a jelly-mesh? Perhaps a way to make the jelly mesh stick to an invisible rigid-body that can somehow not collide with the jelly mesh or something? Again I'm very new to making 3D games, and Unity, so I apologise if I sound naive or am not making any sense.

    Edit: I now have it almost working properly. But there appears to be some sort of limitation on how fast the jelly mesh can roll. Am I right about this? Is this intrinsic to Jelly-Mesh? Or am I just being a noob and missing something.
     
    Last edited: Mar 21, 2015
  45. benthroop

    benthroop

    Joined:
    Jan 5, 2007
    Posts:
    87
    hey MrSquare - question for you

    In Unity 5 they got rid of InteractiveCloth. I was using it for a soccer/football netting and it worked alright. Now I've ported my project to Unity 5 and need a new solution for ball collision with the netting. How do you think Jelly Meshes would work for this? It'd need to do the following:

    - Fix specific vertices in place
    - Collide with specified objects (balls)
    - Act on the colliding object and push it back (this is where the new Unity Cloth fails. They assume the cloth never pushes back)
    - Provide configurable springs between colliders so the net ripples properly
    - Allow for the shape of a 4 sided concave net - or allow 4 individual Jelly Meshes as planes. However a typical professional football net is actually continuous between the sides and top... so it's not ideally all separate planes. There should be some droop.

    Anyway I'd love to pick up the asset if you think it could be set up for this!

    Thanks
     
  46. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey guys - apologies for the lack of reply, seems the forum email notification broke (or got lost in the depths of my inbox).

    Ben - I've sent you an email reply just now. For your requirements it does sound like you need a proper cloth system - Jelly Mesh would probably be quite good in this situation if you were making eg. a mobile game and wanted an efficient way to make a mesh wobble about, but I wouldn't recommend it if you're looking for an accurate net simulation.

    McGunn - there isn't anything limiting rolling speed in the Jelly Mesh asset itself, it'll be the Unity physics system doing something funky. In general, rolling can be quite tricky to get looking right - because the Jelly Mesh is a collection of connected bodies rather than just a single body, it doesn't always work exactly as you'd expect. The best approach might be to iterate over the reference point bodies and apply different forces to each one - ie. the ones at the 'back' (relative to the direction of movement) get pushed up and forwards, whilst the ones at the front get pushed down and back - with the overall effect being that the bodies orbit around the central body.
     
  47. babji3

    babji3

    Joined:
    May 28, 2015
    Posts:
    159
    Hi .is this supports rigidbody .velocity?
    I want jump the cube when I mouse click. so I want to use like rigidbody.velocity.y. is it takes this one?
     
  48. mrsquare

    mrsquare

    Joined:
    Oct 25, 2013
    Posts:
    239
    Hey - yeah, no problem. The best way to apply forces is to use the AddForce function, eg.

    Code (csharp):
    1. {
    2.     JellyMeshjellyMesh = GetComponent<JellyMesh>();
    3.     jellyMesh.AddForce(newVector3(0, 10, 0));
    4. }
    but you could also modify the body velocities manually by doing something like if you really wanted to:

    Code (csharp):
    1. JellyMeshjellyMesh = GetComponent<JellyMesh>();
    2. jellyMesh.CentralPoint.Body3D.velocity = newVector3(0, 10, 0);
    If you've bought the asset, then the demo scene is worth checking out - look in the BlobBehaviour script to see how I make them bounce :)
     
  49. babji3

    babji3

    Joined:
    May 28, 2015
    Posts:
    159
    Thanks for your help..I'll try this.
     
  50. babji3

    babji3

    Joined:
    May 28, 2015
    Posts:
    159
    Hi, I want to jump and rotate the jelly cube .
    To Achieve this i apply above code ,when i click mouse button the jelly cube is jumping,
    for rotation i did animation .the cube is rotate 180 degrees. I apply two color texture to the cube Half side is blue color and other half is orange.
    It works fine jumping and rotation, but the problem is ,it turns same color what it hast start.
    for example.. right side is blue color when i jump the cube it should come the orange color at right side.
    but its not it again snap the blue color. Plz help me how to solve this .or how to rotate at runtime?