hey guys
im working on a new demo at the moment but im stuck on how to use the physics to allow a vehicle to drive properly as well as drift around turns, think of something like wipeout for an idea of what i mean
are there any really useful links, tutorials or librariess to achieve this? ive had a look for hours and havent turned up anything i can follow yet
a basic .love would be awesome
take it easy
-greg
floaty drift vehicle physics
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
floaty drift vehicle physics
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: floaty drift vehicle physics
I would imagine you just turn down the friction and keep gravity at (0,0)
Re: floaty drift vehicle physics
but working out angles and the heading using sin etc? i dont know how that works, any ideas?
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
Re: floaty drift vehicle physics
this is writen for a game in java but the math's is just the same i guess.
http://cloningtheclassics.com/classic-a ... cade-game/
it explains it well
http://cloningtheclassics.com/classic-a ... cade-game/
it explains it well
Re: floaty drift vehicle physics
ive had a go and think it should work but the values arnt numbers :S does anyone have any ideas?
- Attachments
-
- wipeout-00.love
- (211.95 KiB) Downloaded 101 times
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: floaty drift vehicle physics
Code: Select all
craft:setX((craft:getX()) + (xvelocity))
Re: floaty drift vehicle physics
so how do you go about using it then? the angles are messed up
- Attachments
-
- wipeout-02.love
- (212.08 KiB) Downloaded 103 times
-
- wipeout-01.love
- (212.01 KiB) Downloaded 97 times
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: floaty drift vehicle physics
I pretty much completely rewrote it, but have a look at what I did here.
- Attachments
-
- VelocityInDirectionOfAngle.love
- (2.56 KiB) Downloaded 116 times
Re: floaty drift vehicle physics
thanks, it seems to have lost the drifting using the friction value though, how do you implement that?
http://www.gregkirk.co.nr - portfolio | http://shadowharlequin.deviantart.com - deviantart
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
http://www.myspace.com/shadowharlequin - myspace | http://www.vimeo.com/themilkfactory - music visuals
- TechnoCat
- Inner party member
- Posts: 1611
- Joined: Thu Jul 30, 2009 12:31 am
- Location: Milwaukee, WI
- Contact:
Re: floaty drift vehicle physics
Instead of using setVelocity, might try using applyImpulse or something similar. Or a hybrid of the two.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 4 guests