PDA

View Full Version : Puzzled by the physics...



speeder
03-26-2010, 07:21 PM
After much searching around I found out how to make the physics "sorta" work...

Well, objects fall (all them, even ones that I don't want to... But I don't researched yet how to prevent that, because the next issue...)

And objects DO collide with each other, but only like if they all are made of water, "swimming" into each other slowly (and then going fast again as the collision ends...)

As I said, I am making a pong like game, the ball when hitting the paddle just acts like if the paddle was made of goo, slowing down and going through the paddle...

speeder
03-26-2010, 09:20 PM
Actually, the problem was not a actual physics one...

I was moving the entity without using a Brain, so the physics was misbehaving...

but using a Brain now is causing the object to misbehave, I tried all sorts of approaches, each one giving a diffrent wacky bug (like teleporting object, bizarre physics, making anything that touch it to go to hell, even if the object is seemly stopped, shaking all the time, going too slow, shifting the Y position even while moving on the horizontal...)

So... How I make a pong-like paddle that follow the mouse? I am completly clueless... All my tries failed badly (none resulted into something really playable... sometimes it was "near" but still not playable)

Seth
04-10-2010, 02:42 AM
Well, physics is teh tricky.

I've only done basic physics with Novashell (tree world, etc) so I'm afraid I can't really help much without looking at the exact code and seeing the problem myself.

If you post your novashell project I will try to take a look. :sweatdrop:

speeder
05-10-2010, 07:45 PM
Hum... I implemented at first, some keyboard control, following the tutorials, using the brain manager... That made the game "work"

Then I decided to test again, putting mouse control (just a line: SetPos(mouseX, currentY) ) and somthing unexpected happened: It worked. Fine.


I guess that having a brain manager, make a diffrence somehow...