How I make a ball with physics bounce on no physics objects?

Get help using Construct 2

Post » Mon Jul 06, 2015 5:38 pm

I'm trying to do the soccer ball physics from a top down view. Is working perfect now it's simply to know if there is a more efficient way to do that.

Actually i have the ball bouncing with other objects adding to every object to a family that have the behaviour of physics with:
Inamovable: Yes | Collision mask: Use collision Polygon.

This is how is working now:
https://instagram.com/p/4zZHf-gLzH/

Is there another way to make the ball bounce with objects, for example with the ones that have the "solid" behaviour?. With this i will have one less family and behaviour added to the objects and i guess the perfomance will be better instead of add physics to all the objects that i want the ball bounce, right?

Will be great an option on the physics object called "Bounce". So when Ball collides an object -> Bounce. But i not found nothing ¿?
B
26
S
10
G
3
Posts: 582
Reputation: 4,591

Post » Tue Jul 07, 2015 1:46 pm

Nothing? So there is no possible? :S all the examples i found their use physics in the objects to bounce so i guess there will be no possibility.

Then will be great for next updates of the physics object an event or parameter to say: "bounce on solids? - Yes/No".
B
26
S
10
G
3
Posts: 582
Reputation: 4,591

Post » Tue Jul 07, 2015 10:06 pm

You can have the bullet behavior bounce off solids, but the physics behavior needs the other objects to have physics to work. The physics behavior will give more realistic bounces though. The third option would be to do your own physics with events, but this isn't by any means simple.
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Wed Jul 08, 2015 6:42 am

R0J0hound wrote:You can have the bullet behavior bounce off solids, but the physics behavior needs the other objects to have physics to work. The physics behavior will give more realistic bounces though. The third option would be to do your own physics with events, but this isn't by any means simple.


The problem is that with bullet behaviour the sprite move towards the rotation angle, so i can't make the ball moves, bounce and give them some sprite rotation depending of the velocity because this will change the real direction.

I mean, actually with physics i give the ball impulse to move/bounce and give the sprite some rotation depending of the velocity and works correctly.

So or there is any form to use the Bullet behaviour to move, bounce and rotate the sprite without this affect to the direction angle of the movement or i use 2 sprites, one that moves and bounce and set invisible and the sprite ball every tick in the same position giving rotation depending of the speed. But with the last one i will have to create/use 2 sprites for every thing i want to make the same effect.

Create my own physics well, i'm a noob i only have a few days of experience on C2 so not :P .
B
26
S
10
G
3
Posts: 582
Reputation: 4,591

Post » Wed Jul 08, 2015 5:17 pm

You can make the bullet behavior not affect the sprite's angle by setting it's "set angle" property to "no".
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Wed Jul 08, 2015 5:31 pm

Yes but if i set "no" then i can launch the ball towards angle using Bullet Behaviour to calculate in what direction will be theball moving when is touched by the player.

At least i tested in both ways and with the "property: no" i was not able to launch/move the ball towards some angle ¿?. I will test again with other options but i remember that not works correctly.
B
26
S
10
G
3
Posts: 582
Reputation: 4,591

Post » Tue Aug 04, 2015 4:26 pm

matriax wrote:Yes but if i set "no" then i can launch the ball towards angle using Bullet Behaviour to calculate in what direction will be theball moving when is touched by the player.

At least i tested in both ways and with the "property: no" i was not able to launch/move the ball towards some angle ¿?. I will test again with other options but i remember that not works correctly.


Setting the angle has nothing to do with setting the angle of motion..

To launch the ball at angle you should use ball set bullet angle of motion..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775


Return to How do I....?

Who is online

Users browsing this forum: R0J0hound and 27 guests