Ambiera ForumDiscussions, Help and Support. 



Author  Text  

Hello everyone, I want to know if anyone can assist making a javascript for Bounce and move effect. For example similar to the Helix jump https://youtu.be/mJ7JK_5_uI Using ccbSetPhysicsVelocity; The sphere object will bounce from ccbGetSceneNodeFromName or a folder of scene node. Also changing the rotation of the bounce which will effect walls and floors. In attributes property create how many bounce you want the sphere object to make such as 1 bounce, 2, bounce or unlimited bounce. Also in attribute property change the speed of the bounce. Create a check list for effect wall or floor. In every bounce the scene node move forward in position. This can be helpful for sport purpose or throwing a rock in a lake. 


Also in attribute property change the distance of the bounce 


does the ball have compression at each bounce ? 


use a parabol function: y = A*X*X + B*X + C you want parabol with a top so: C = positive A = negative and B = negative what distance do you want to cover in all that bouncing? oke say the distance = 10 then that is covered in 2 leaps and 3 bounces (Bounce = touch ground) distance and height of each leap is related to each other and unequal, becoming smaller, easiest related by pythagoras formula = hypothenuse * hypothenuse = leapdist * leapdist + leapheight * leapheight. So the 2 unequal leap distance (but together = 10) on the ground are related by some kind of sizing sequence. you could use fibunacci formula for dividing the travel distance 10 into 2 parts. Fibunacci sequence is 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144 etc Only two steps needed, no zero or same values allowed. so division is 1*X and 2 *X = 10 so first leap is 6.67 far and 13.34 high and second leap is 3.33 far and 6.67 high formula for the first parabola is then heigth = 6.67 * X * X 6.67 * X + 13.347 that is when the top was reached at the start point, but that is not the case, we reach the top at half the leapdistance travelled so we move formula to the right formula for the first parabola is then heigth = 6.67 * X * X + 6.67 * X + 13.347 and for the second parabola leap formula becomes similar: heigth = 3.33 * X * X + 3.33 * X + 6.67 my solution will begin with this. What do you think ? will this work, can it be simplified ? 


It came be simplified 


use this action as template: Drag 3D Object put functions that change position of ball into dragging function. simpler solution: can also do in blender but without the controls: height of jump, distance of jump, number of jumps. 
