Alice Community (http://www.alice.org/community/index.php)
-   How do I...? (http://www.alice.org/community/forumdisplay.php?f=16)
-   -   How do I allow a car to realistically "drift" in Alice? (http://www.alice.org/community/showthread.php?t=2631)

 davinci6 05-07-2009 12:58 PM

How do I allow a car to realistically "drift" in Alice?

How would I code a car to make it realistically drift (think "Fast and Furious: Tokyo Drift")?

 HisWorld 05-07-2009 06:53 PM

1 Attachment(s)
Well, first let me ask you how much programming experience do you have? Can you figure out a way to add some simulated inertia? Meaning your car gradually builds up speed? :confused:

I doubt you will be able to complete this or understand what I am saying without that level of expertise.

As I have never done this or seen it done I can't be for certain the best method. But I bet the best method would be to create a very small object starting inside the vehicle you intend to use. Have that object be the one controling the speed and direction of your vehicle.

I made a world that might get you started in the right direction, I tried for maybe an hour to be able to manipulate the orientation of objects in a way other than simply setting one = to another.

No success :(but I bet you can figure it out:D Keep me updated.

 Scott300 05-08-2009 07:53 AM

[QUOTE=HisWorld;10046]Well, first let me ask you how much programming experience do you have? Can you figure out a way to add some simulated inertia? Meaning your car gradually builds up speed? :confused:

I doubt you will be able to complete this or understand what I am saying without that level of expertise.

As I have never done this or seen it done I can't be for certain the best method. But I bet the best method would be to create a very small object starting inside the vehicle you intend to use. Have that object be the one controling the speed and direction of your vehicle.

I made a world that might get you started in the right direction, I tried for maybe an hour to be able to manipulate the orientation of objects in a way other than simply setting one = to another.

No success :(but I bet you can figure it out:D Keep me updated.[/QUOTE]

Wow thats a really good start to drifting HisWorld I really like the stuff you have been posting on the forum =), I mean honestly with that all you would need to do is make an animation for a fast turn and mess with he speed as your doing the drift to make it look like it.

in a new method called when you hit shift

if your moveing currently //(I forgot what var you used lol)
{
while world.drifting == true //while pressing shift make this true when shift is let go of make it false
{
if world.isturningleft == true
//make it so when you turn left it sets isturningleft to true and when your turning right set it false
{
do together
{
method slowdown var setnewspeed = 3 and set drift == true
turn car left .05
}
method speedup setnewspeed = 3
}
else
{
turn car right .05
}

and in slowdown and speedup make it so setnewspeed when its not 0 will change the current speed to w/e the var is and make it so when drift == true it changes how speed is sloweddown/speedup I mean at this point its all just makeing it look cool ^_^

 All times are GMT -5. The time now is 09:42 AM.