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

#1 2012-08-15 09:09:50

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Trigonocmettry car turner

How do you make a scrolling car turn on ramps

             when gf clicked                           stop script                    


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#2 2012-08-15 09:34:52

SimplyMelee
Scratcher
Registered: 2012-01-14
Posts: 100+

Re: Trigonocmettry car turner

I don't quite understand what you are asking. Can I ask you to explain it more clearly?


http://oi48.tinypic.com/2czzjol.jpg

Offline

 

#3 2012-08-15 12:45:03

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Trigonocmettry car turner

It's spelled "Trigonometry".  smile

Please elaborate.


http://i50.tinypic.com/312u714.jpg

Offline

 

#4 2012-08-15 13:22:05

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Trigonocmettry car turner

My bad


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#5 2012-08-15 13:24:38

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Trigonocmettry car turner

Your wheels on your car turn in a direction of the angle of the ground


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#6 2012-08-15 13:27:16

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Trigonocmettry car turner

Scrolling doesnt matter. Just replace the x and y variables to scrolling equivalents.

x=cos(a)*vx
y=sin(a)*vy

Variables:
x is the increment of the x coordinate
y is the increment of the y coordinate
a is the angle of the car
vx is the x velocity
vy is the y velocity

Add x and y to the x and y coordinates.


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#7 2012-08-15 13:33:42

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Trigonocmettry car turner

I think i understand but could you put it in scratch blocks please


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#8 2012-08-15 13:40:36

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Trigonocmettry car turner

change [x v] by ([cos v] of (((a v) * (vx v)))
change [y v] by (sin(((a v) * (vy v)))
Someone fix, please.

Last edited by bobbybee (2012-08-15 13:44:34)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#9 2012-08-15 13:48:51

JH1010
Scratcher
Registered: 2012-05-31
Posts: 1000+

Re: Trigonocmettry car turner

bobbybee wrote:

change [x v] by [[cos v] of (((a v) * (vx v))]
change [y v] by [sin(((a v) * (vy v))]
Someone fix, please.

Sort of fixed.

Last edited by JH1010 (2012-08-15 13:49:22)

Offline

 

#10 2012-08-15 13:53:14

BirdByte
Scratcher
Registered: 2012-07-07
Posts: 1000+

Re: Trigonocmettry car turner

JH1010 wrote:

bobbybee wrote:

change [x v] by ([cos v] of ((a) * (vx)))
change [y v] by ([sin v] of ((a) * (vy)))
Someone fix, please.

Sort of fixed.

Fixed entirely.


http://i50.tinypic.com/312u714.jpg

Offline

 

#11 2012-08-15 14:01:17

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Trigonocmettry car turner

What are their initial values and where do you put it on in the motion blocks?


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

#12 2012-08-15 21:06:59

bobbybee
Scratcher
Registered: 2009-10-18
Posts: 1000+

Re: Trigonocmettry car turner

Vx and vy are initially 0, if you implement physics,. Without physics, set them to the car speed.

Use the x and y variables in scrolling (look it up, it's a whole other discussion)


I support the Free Software Foundation. Protect our digital rights!

Offline

 

#13 2012-08-18 03:18:41

Jodymoses
Scratcher
Registered: 2012-05-03
Posts: 100+

Re: Trigonocmettry car turner

I mean the turning blocks and what is a


http://i46.tinypic.com/2hxwx9s.png
I Have Huge Ideas, But Only If You Listen And Talk To Me...

Offline

 

Board footer