How could i make a trampoline?
Do any of you have idea of how i could make an trampoline? i dont need the full tutorial, just some of the commands i would need in the blueprint. I just need the command for the object to push the thing touching it away with x force in x direction.
Posted Sep 24, 2014, 2:10 PM UTC
...I don't quite follow you.
Technically you only need to take the results from your "Event Hit" and calculate how far you want him to bounce in which direction.
I mean you get the direction, the impulse (you may call this the force of the impact) and the location.
Everything you need to calculate a bounce.
Adding on to this --
Everytime the object hits the ground, you want to calculate the energy loss so after each bounce, the ball bounces a little bit less higher.
So basically
Use that and solve for v for each bounce and apply it to the object.
I'm not the most competent person in Physics, so this could be slightly wrong or completely wrong, but I would google "how to calculate a bounce trajectory" for possible algorithms. In the meantime I'll try to write a little program to see if I'm write. Message me if you get interested in the results.
I'm new to ue4, but what would the command be for the "bounce", i do know how to make other meshes bounce but not the player.
So the "bouncing" you see of objects is just the physics engine at work one those objects. I don't THINK there's a property to adjust their "bounce" but there may be and I just missed it.
But to make a player pawn "bounce", you could cheat and just edit the player controller blueprint detailed in this web page so that when the pawn comes in contact with a trampoline object, it triggers a jump event for the pawn.
I don't know the best way to execute this because checking every collision the pawn comes in contact with sounds like it could lead to some resource problems, but give my idea a try and then look at refining it.
If i make it so the blueprint executes a jump event each time it hits an object, then i cant really make it realistic as the jump height will be the same each time. I was just wondering if there was a command to push the player away or something. If i could make the player a physic object i could make a bouncy physical material for the trampoline. I have tried this but cant get it to work, the player just cant interact with physical materials like a normal physics object,got any ideas on how to get it to work?