Ball bounce based on previous rotation

How would you make this ball bounce off the sides based on its previous rotation. Like, just reversing it yk?

add 180 to rotation on collision with anything

That just makes it bounce back and forth. I meant this

add 90

A Complicated Way (To Paste Into the Ball)

{“data”:{“behavior”:{“v”:“2”,“nodes”:[{“inputCount”:0,“outputCount”:1,“name”:“Collision”,“behaviorType”:“logic.triggers.Collision”,“x”:450,“y”:-320,“group”:"",“id”:“541d09beaefa2c49”,“targetClassId”:14357764,“targetEntityId”:0,“collisionFilter”:1,“collideWithEntity”:false,“delay”:0},{“inputCount”:0,“outputCount”:1,“name”:“Collision”,“behaviorType”:“logic.triggers.Collision”,“x”:450,“y”:-224,“group”:"",“id”:“541df43098442d41”,“targetClassId”:14357764,“targetEntityId”:0,“collisionFilter”:2,“collideWithEntity”:false,“delay”:0},{“inputCount”:0,“outputCount”:1,“name”:“Always”,“behaviorType”:“logic.triggers.Always”,“x”:-270,“y”:-608,“group”:"",“id”:“54207fff21a15a46”},{“inputCount”:0,“outputCount”:1,“name”:“Once”,“behaviorType”:“logic.triggers.Once”,“x”:450,“y”:-608,“group”:"",“id”:“542332800b0f4648”,“resetOnLevelStart”:false},{“inputCount”:1,“outputCount”:1,“name”:“Extractor”,“behaviorType”:“logic.properties.Extractor”,“x”:630,“y”:-576,“group”:"",“id”:“54233f460cae8345”,“targetId”:0,“prop”:“starting value”},{“inputCount”:0,“outputCount”:1,“name”:“Collision”,“behaviorType”:“logic.triggers.Collision”,“x”:450,“y”:-128,“group”:"",“id”:“5426332b4801974c”,“targetClassId”:14357764,“targetEntityId”:0,“collisionFilter”:4,“collideWithEntity”:false,“delay”:0},{“inputCount”:0,“outputCount”:1,“name”:“Collision”,“behaviorType”:“logic.triggers.Collision”,“x”:450,“y”:-32,“group”:"",“id”:“54264cc5df19ea43”,“targetClassId”:14357764,“targetEntityId”:0,“collisionFilter”:8,“collideWithEntity”:false,“delay”:0},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:-320,“group”:"",“id”:“5428c105265a7445”,“startVal”:270,“tag”:“Top”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:-224,“group”:"",“id”:“5428e7c01517ab4c”,“startVal”:90,“tag”:“Bottom”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:-128,“group”:"",“id”:“5429500606271b43”,“startVal”:180,“tag”:“Left”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:630,“y”:-32,“group”:"",“id”:“542986106e61fa4c”,“startVal”:0,“tag”:“Right”,“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:-90,“y”:-608,“group”:"",“id”:“542a4a4ac9234149”,“startVal”:2,“tag”:"",“roundMode”:1},{“inputCount”:3,“outputCount”:3,“name”:“Velocity”,“behaviorType”:“logic.properties.Physics”,“x”:90,“y”:-608,“group”:"",“id”:“542a5f31443e8945”},{“inputCount”:1,“outputCount”:1,“name”:“Extractor”,“behaviorType”:“logic.properties.Extractor”,“x”:-90,“y”:-512,“id”:“542cec4839dd1641”,“targetId”:0,“prop”:“x”},{“inputCount”:1,“outputCount”:1,“name”:“Extractor”,“behaviorType”:“logic.properties.Extractor”,“x”:-90,“y”:-416,“id”:“542cec4909f6c141”,“targetId”:0,“prop”:“y”},{“expression”:“B-A”,“default0”:0,“default1”:0,“default2”:0,“default3”:0,“default4”:0,“default5”:0,“params”:2,“version”:2,“tag”:"",“inputCount”:3,“outputCount”:1,“name”:“Expression”,“behaviorType”:“logic.logic.Expression”,“x”:270,“y”:-512,“id”:“542cec4d42d32544”},{“inputCount”:2,“outputCount”:2,“name”:“Toggle”,“behaviorType”:“logic.logic.FlipFlop”,“x”:90,“y”:-512,“id”:“542cec4e7e8d9249”,“loop”:false,“initialState”:0},{“inputCount”:2,“outputCount”:2,“name”:“Toggle”,“behaviorType”:“logic.logic.FlipFlop”,“x”:90,“y”:-416,“id”:“542cec4ee612fc4f”,“loop”:false,“initialState”:0},{“expression”:“B-A”,“default0”:0,“default1”:0,“default2”:0,“default3”:0,“default4”:0,“default5”:0,“params”:2,“version”:2,“tag”:"",“inputCount”:3,“outputCount”:1,“name”:“Expression”,“behaviorType”:“logic.logic.Expression”,“x”:270,“y”:-416,“id”:“542cec4f5aeb5d4c”},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:450,“y”:-512,“id”:“542cec4f9a47ee48”,“startVal”:0,“tag”:"",“roundMode”:1},{“inputCount”:3,“outputCount”:1,“name”:“Number”,“behaviorType”:“logic.logic.Value”,“x”:450,“y”:-416,“id”:“542cec500ccaf248”,“startVal”:0,“roundMode”:1},{“expression”:"(((((Math.atan2(B,A))180)/(Math.PI))%360)+360)%360",“default0”:0,“default1”:0,“default2”:0,“default3”:0,“default4”:0,“default5”:0,“params”:2,“version”:2,“tag”:“Velocity Angle (Degrees)”,“inputCount”:3,“outputCount”:1,“name”:“Expression”,“behaviorType”:“logic.logic.Expression”,“x”:630,“y”:-480,“id”:“542cec510307d94b”},{“expression”:"(2(90-(A-B)))+A",“default0”:0,“default1”:0,“default2”:0,“default3”:0,“default4”:0,“default5”:0,“params”:2,“version”:2,“tag”:“Angle Reflect”,“inputCount”:3,“outputCount”:1,“name”:“Expression”,“behaviorType”:“logic.logic.Expression”,“x”:810,“y”:-320,“group”:"",“id”:“542ef88dc3cbd54a”},{“inputCount”:2,“outputCount”:2,“name”:“Rotation”,“behaviorType”:“logic.properties.Rotation”,“x”:990,“y”:-512,“group”:"",“id”:“545809d3b7eb3346”}],“links”:[{“input_id”:“5428c105265a7445i1”,“output_id”:“541d09beaefa2c49o0”},{“input_id”:“5428e7c01517ab4ci1”,“output_id”:“541df43098442d41o0”},{“input_id”:“542a4a4ac9234149i1”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“542cec4839dd1641i0”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“542cec4909f6c141i0”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“54233f460cae8345i0”,“output_id”:“542332800b0f4648o0”},{“input_id”:“54233f460cae8345i0”,“output_id”:“542332800b0f4648o0”},{“input_id”:“545809d3b7eb3346i0”,“output_id”:“54233f460cae8345o0”},{“input_id”:“5429500606271b43i1”,“output_id”:“5426332b4801974co0”},{“input_id”:“542986106e61fa4ci1”,“output_id”:“54264cc5df19ea43o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5428c105265a7445o0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5428c105265a7445o0”},{“input_id”:“5428e7c01517ab4ci1”,“output_id”:“541df43098442d41o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5428e7c01517ab4co0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5428e7c01517ab4co0”},{“input_id”:“5429500606271b43i1”,“output_id”:“5426332b4801974co0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5429500606271b43o0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5429500606271b43o0”},{“input_id”:“542986106e61fa4ci1”,“output_id”:“54264cc5df19ea43o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“542986106e61fa4co0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“542986106e61fa4co0”},{“input_id”:“542a4a4ac9234149i1”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“542a5f31443e8945i2”,“output_id”:“542a4a4ac9234149o0”},{“input_id”:“542a5f31443e8945i2”,“output_id”:“542a4a4ac9234149o0”},{“input_id”:“542cec4839dd1641i0”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“542cec4e7e8d9249i1”,“output_id”:“542cec4839dd1641o0”},{“input_id”:“542cec4909f6c141i0”,“output_id”:“54207fff21a15a46o0”},{“input_id”:“542cec4ee612fc4fi1”,“output_id”:“542cec4909f6c141o0”},{“input_id”:“542cec4d42d32544i0”,“output_id”:“542cec4e7e8d9249o0”},{“input_id”:“542cec4d42d32544i0”,“output_id”:“542cec4f9a47ee48o0”},{“input_id”:“542cec4d42d32544i1”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4d42d32544i2”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4f9a47ee48i1”,“output_id”:“542cec4d42d32544o0”},{“input_id”:“542cec510307d94bi0”,“output_id”:“542cec4d42d32544o0”},{“input_id”:“542cec4e7e8d9249i0”,“output_id”:“542cec4e7e8d9249o0”},{“input_id”:“542cec4e7e8d9249i1”,“output_id”:“542cec4839dd1641o0”},{“input_id”:“542cec4d42d32544i0”,“output_id”:“542cec4e7e8d9249o0”},{“input_id”:“542cec4e7e8d9249i0”,“output_id”:“542cec4e7e8d9249o0”},{“input_id”:“542cec4f9a47ee48i0”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4d42d32544i1”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4d42d32544i2”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4ee612fc4fi0”,“output_id”:“542cec4ee612fc4fo0”},{“input_id”:“542cec4ee612fc4fi1”,“output_id”:“542cec4909f6c141o0”},{“input_id”:“542cec4f5aeb5d4ci0”,“output_id”:“542cec4ee612fc4fo0”},{“input_id”:“542cec4ee612fc4fi0”,“output_id”:“542cec4ee612fc4fo0”},{“input_id”:“542cec500ccaf248i0”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec4f5aeb5d4ci1”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec4f5aeb5d4ci2”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec4f5aeb5d4ci0”,“output_id”:“542cec4ee612fc4fo0”},{“input_id”:“542cec4f5aeb5d4ci0”,“output_id”:“542cec500ccaf248o0”},{“input_id”:“542cec4f5aeb5d4ci1”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec4f5aeb5d4ci2”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec510307d94bi1”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542cec510307d94bi2”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542cec500ccaf248i1”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542cec4f9a47ee48i0”,“output_id”:“542cec4e7e8d9249o1”},{“input_id”:“542cec4f9a47ee48i1”,“output_id”:“542cec4d42d32544o0”},{“input_id”:“542cec4d42d32544i0”,“output_id”:“542cec4f9a47ee48o0”},{“input_id”:“542cec500ccaf248i0”,“output_id”:“542cec4ee612fc4fo1”},{“input_id”:“542cec500ccaf248i1”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542cec4f5aeb5d4ci0”,“output_id”:“542cec500ccaf248o0”},{“input_id”:“542cec510307d94bi0”,“output_id”:“542cec4d42d32544o0”},{“input_id”:“542cec510307d94bi1”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542cec510307d94bi2”,“output_id”:“542cec4f5aeb5d4co0”},{“input_id”:“542ef88dc3cbd54ai0”,“output_id”:“542cec510307d94bo0”},{“input_id”:“542ef88dc3cbd54ai0”,“output_id”:“542cec510307d94bo0”},{“input_id”:“542ef88dc3cbd54ai0”,“output_id”:“545809d3b7eb3346o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5428c105265a7445o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5428e7c01517ab4co0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“5429500606271b43o0”},{“input_id”:“542ef88dc3cbd54ai1”,“output_id”:“542986106e61fa4co0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5428c105265a7445o0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5428e7c01517ab4co0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“5429500606271b43o0”},{“input_id”:“542ef88dc3cbd54ai2”,“output_id”:“542986106e61fa4co0”},{“input_id”:“545809d3b7eb3346i0”,“output_id”:“542ef88dc3cbd54ao0”},{“input_id”:“545809d3b7eb3346i0”,“output_id”:“542ef88dc3cbd54ao0”},{“input_id”:“545809d3b7eb3346i0”,“output_id”:“54233f460cae8345o0”},{“input_id”:“542ef88dc3cbd54ai0”,“output_id”:“545809d3b7eb3346o0”}]}}}

But another option is to just uncheck that the ball is affected by gravity and then change its Bounce value to 100. Flowlab’s default bounce physics are pretty decent.

If it moves around freely, I would remove gravity and make Friction = 0 and Bounce = 100.
I made a small game similarly for a Jam.

1 Like