Page 1 of 1

Top-down surface friction demo

Posted: Sun Mar 30, 2014 10:22 pm
by Azhukar
Box2d friction joints used to emulate top-down friction. Works even with mobile surface bodies.

Re: Top-down surface friction demo

Posted: Sun Apr 13, 2014 10:34 pm
by integralsleeper
This is very awesome.

I am wondering if there is a way to look at the source from a .love file. I am new to this, but would like to learn as much as I can. This would be great for a top-down racing/driving game.

Re: Top-down surface friction demo

Posted: Sun Apr 13, 2014 11:13 pm
by davisdude
Change the extension from a .love to a .zip, then you can view it as a normal .zip file.

Re: Top-down surface friction demo

Posted: Mon Apr 21, 2014 11:26 pm
by luaiscool
Hope you see this!

I was wondering if I could use your code for turning like how you rotated then went forward. I wanted to use that code for something I'm making. I'm not sure if I'll share it on here but if I do I'll give you credit in code and in the game :) Great idea too!

Re: Top-down surface friction demo

Posted: Mon Apr 21, 2014 11:29 pm
by luaiscool
On second thought, Took a look through your code and I've realized it much harder the way you set it up because you wanted to make that section orientated to your "game" thing so is there a chance you can message me or give me a bit of help on how to do that? If so that would be great thanks :)

Re: Top-down surface friction demo

Posted: Tue Apr 22, 2014 1:32 am
by davisdude
Sure! You can use it! I'll show you the important parts:

Code: Select all

Direction = math.atan2( ( ObjectY - TargetY ), ( ObjectX - TargetX ) )
Then you set that as the direction. Good luck!

Re: Top-down surface friction demo

Posted: Tue Apr 22, 2014 10:11 pm
by luaiscool
davisdude wrote:Sure! You can use it! I'll show you the important parts:

Code: Select all

Direction = math.atan2( ( ObjectY - TargetY ), ( ObjectX - TargetX ) )
Then you set that as the direction. Good luck!
I'm very confused is it alright if I put this up on media fire and you can download it and give me some help?

Re: Top-down surface friction demo

Posted: Wed Apr 23, 2014 6:31 pm
by Sodium
I tried to make a box2d car game once, but yours is way better.