About elasticity
buftea
Member Posts: 43
How can I make an actor more elastic?
For example in a pool game if a ball gets near the mantle , if I hit it had on it doesn't move. And I want the mantle to be more elastic to bounce the ball back. How do I do that? I've tried with the physics in the game , but it cannot make it to work. Do I have to change the bounciness by some weird formula?
Comments
Bounciness is set from 0-3 so you can set it as .1, .2 et... up to 3 make sure you up the bounciness in the mantle actor
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
I'Ve tried that, it doesn't work. I made a quick example , it's attached in this post. If you move the black ball like in the image and then try to hit it had on, it stays next to the mantle. I don't want that, I want the black ball to bounce like it was made of rubber.
Made some adjustments. You need to keep slightly adjusting things until you get the effect you want. there is no need to pin a non movable actor.
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
Maybe I'm not explaining very well what I want. I made 2 GIFs. I want the black ball to bounce back.
Where is the starting point for the black ball, if it starts against the cushion it won't bounce back, it will remain still, this is true for GS and this is what happens in the real world too.
Yes that's it! I want to bend the laws of physics! How do I do that? I think there must be a way by changing some attribute. I'm not really sure where to start ... Maybe with 2 constrained overlapping black balls?
Yep, then GS is behaving as it should behave, following the real world laws of physics, like a Newton's Cradle with balls A, B and C . . . A is pulled back then swung towards B, when A hits B, B will remain static and transfer the energy of the impact to C, and C will swing out of the other side . . .which is what is happening with your example.
I'm not sure how your games works, what it needs to do, or anything to about your game at all, so I can't make any kind of useful suggestion beyond guessing what you need ?
My best guess is that you want the ball to bounce back at a lesser speed than the incoming ball, and for it to bounce off the cushion in a random direction ? If that's the case you can give the ball a rule that says when colliding with the white ball change velocity to a speed and direction of your choice, hope that helps.
You probably want to see the doctor about that.
I'll try something based on this. Thanks
Unfortunately the Healthcare System in my country is not that advanced, the doctors don't know anything about GS
Hello , I'm back with this issue. I followed @Socks advice and I ve made a test where half of what I want is happening ok and half of it isn't.
When the black ball is next to the mantle and is hit by the white one, it will follow the trajectory of the white ball after the collision.
But I want this to happen only if the white ball hits the blackball after the perpendicular . If the collision takes places before the perpendicular, I want the black ball to stay still. The perpendicular is the imaginary line that is perpendicular to the mantle where the black ball touches the mantle.
I've attached my test to this post, could you please tell me what I'm doing wrong?
The white ball and the orange square will follow the mouse when it's pressed over them.
The orange square should be used to place the black ball next to the mantle before you start testing.
Hey guys, was my last post to vague ? should I explain more what I want GS to do?
I really could use the help, I think it has to do with my lack of understanding the logic behind the collision behaviour in GS
Thanks