#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Bounce

Posts: 26Member
OK so let's say there's a ball on the screen and the ball is moving downwards at a constant speed. A rock comes in from the side and hits the ball, bouncing off the ball at a much faster speed than it was going before it hit the ball. But the ball is unaltered whatsoever by the rock. Help?

• London, UKPosts: 1,893Member
Have you got a bounce behaviour on your ball? Set it to bounce when colliding with rock
• Auckland, New ZealandPosts: 854Member
edited September 2013
You want the ball to not bounce and stay straight you need to lock it's linear velocity in a certain direction - I have made a simple example that does what you ask. Not sure if it will be suitable but it does do exactly what you ask - the specifics or ball controls might affect this however - it uses constrain which locks the player to a certain value of linear velocity and speed.
• Posts: 26Member
@matarua That was perfect thanks.
• Posts: 26Member
@matarua Actually for my game, the rock is the player and whenever I hit the ball, the ball still moves a little bit. And I want it to stay in place with all the other balls, so they look like a solid mass of seperate balls.
• Posts: 26Member
Sort of like a ship moving through small islands.
• Auckland, New ZealandPosts: 854Member
It's a little tricky to visualise - you could upload pics or the project - something to help - it's not easy to just come up with a solution based on this so far sorry :-S
• Posts: 1,610Member
Put a check mark in Fixed Rotation this will stop it turning if that is what you mean.
• Posts: 26Member
@matarua http://postimg.org/image/ijpjwbobr/ I hope you get my drift. I want the green to all hold their positions relative to each other while moving down the screen. I want the red(player) to bounce off of them.
• Auckland, New ZealandPosts: 854Member
What I posted before does that - you just needed to delete all the little red blocks and duplicate the white blocks.

Here's an update - but to do this it might be better to just lock all the objects and then scroll the camera instead. Much less overhead.

• Posts: 26Member
@matarua I would but I'm trying to make an endless game. I did exactly what was on the template, yet every time my player hits them, since I'm making the player hit them, they nudge a little. I even copied my player into your template, and they nudge. Is that just because I'm playing it on the computer or is that problem going to carry over to the device?
• Posts: 26Member
Sorry to keep you with this.
• Auckland, New ZealandPosts: 854Member
Nope they should never move off their axis - you could up their density in the physics and then lower it on your player perhaps which would me it's like a rock and ping pong ball - that might help? Perhaps look at some endless templates and you might get some ideas All the best, cheers, [email protected]
• Posts: 26Member
@matarua Just wanna let you know your density idea worked sooo great thanks, you saved my game with that.
• Auckland, New ZealandPosts: 854Member