This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2011-07-22 16:18:47

Filtaido
Scratcher
Registered: 2009-04-30
Posts: 33

I need help with car acceleration

I am trying to make a project similar to "drift car sim" by Shwingie.  Is there a way to do that without all that trigonometry?


84% of teenagers own cell phones.  Add this to your signature if you like pop tarts.  tongue

Offline

 

#2 2011-07-22 19:26:01

floppy_gunk
Scratcher
Registered: 2008-11-14
Posts: 500+

Re: I need help with car acceleration

Filtaido wrote:

I am trying to make a project similar to "drift car sim" by Shwingie.  Is there a way to do that without all that trigonometry?

If you want the car to skid, then you need to use trigonometry. You don't need to know any trigonometry for anything else, just velocity and acceleration.


http://img163.imageshack.us/img163/1917/2856lg.jpg Get it now!  smile

Offline

 

#3 2011-07-22 20:23:51

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I need help with car acceleration

Well, there is one way you could make the car move independently of its direction without trigonometry. You can make a mock "car" sprite that follows another invisible sprite that actually controls the movement, and make the visible sprite turn to appear as though it's drifting.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#4 2011-07-22 20:48:31

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: I need help with car acceleration

Harakou wrote:

Well, there is one way you could make the car move independently of its direction without trigonometry. You can make a mock "car" sprite that follows another invisible sprite that actually controls the movement, and make the visible sprite turn to appear as though it's drifting.

Well it will need trigonometry for the "mock car" sprite.


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

#5 2011-07-22 21:22:21

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: I need help with car acceleration

Thescratch3 wrote:

Harakou wrote:

Well, there is one way you could make the car move independently of its direction without trigonometry. You can make a mock "car" sprite that follows another invisible sprite that actually controls the movement, and make the visible sprite turn to appear as though it's drifting.

Well it will need trigonometry for the "mock car" sprite.

No it wouldn't.  hmm  All the visible sprite would have to do is turn and go to the position of the invisible one.


http://www.blocks.scratchr.org/API.php?action=random&return=image&link1=http://i.imgur.com/OZn2RD3.png&link2=http://i.imgur.com/duzaGTB.png&link3=http://i.imgur.com/CrDGvvZ.png&link4=http://i.imgur.com/POEpQyZ.png&link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

#6 2011-07-23 12:22:14

EdnaC
Scratcher
Registered: 2007-08-28
Posts: 100+

Re: I need help with car acceleration

"Drifting" isn't trivial, I'm not sure if you could pull it off realistically without trig.  I've done a "spaceship" type project with a guide sprite, but it doesn't really act much like a car would. 

Here's a drift car project that acts about right - you could copy the car from it for your project if desired.

Offline

 

#7 2011-07-23 13:57:09

Thescratch3
Scratcher
Registered: 2011-06-14
Posts: 1000+

Re: I need help with car acceleration

Harakou wrote:

Thescratch3 wrote:

Harakou wrote:

Well, there is one way you could make the car move independently of its direction without trigonometry. You can make a mock "car" sprite that follows another invisible sprite that actually controls the movement, and make the visible sprite turn to appear as though it's drifting.

Well it will need trigonometry for the "mock car" sprite.

No it wouldn't.  hmm  All the visible sprite would have to do is turn and go to the position of the invisible one.

But what about the "mock car" sprite?


View my projects. Or face The scratch curse! (Get it?)
http://i56.tinypic.com/2cdk8hy.png

Offline

 

Board footer