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

#1 2012-09-13 08:50:26

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

Feet on ground

How do you make a sprite keep its feet on the ground by turning mayby starting with the scratch cat and then adusting with a different sprite


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

Offline

 

#2 2012-09-13 08:53:36

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

Re: Feet on ground

Its feet touches a black flat then when you scroll it touches a black ramp


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

Offline

 

#3 2012-09-13 08:56:06

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

Re: Feet on ground

Bump


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

Offline

 

#4 2012-09-13 09:37:33

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Feet on ground

Ramps can be complicated.  The easiest way that I know of is this:

Make each foot a different color (for this example, the left foot is red, the right foot is blue).  Then, based on whether which foot is touching the ground, rotate the sprite:

when gf clicked
point in direction (90 v)
forever
if<not<color [#0000FF] touching color [#000000]?>>
turn cw (5) degrees
end
if<not<color [#FF0000] touching color [#000000]?>>
turn ccw (5) degrees
end


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#5 2012-09-13 09:42:59

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

Re: Feet on ground

Tried it ... Not effective... But cant you use trig in some way.. Thanx for trying


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

Offline

 

#6 2012-09-13 16:22:55

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: Feet on ground

Jodymoses wrote:

Tried it ... Not effective... But cant you use trig in some way.. Thanx for trying

If you know the slope or angle of the incline

Last edited by MoreGamesNow (2012-09-13 16:23:12)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#7 2012-09-13 16:28:19

zubblewu
Scratcher
Registered: 2011-02-17
Posts: 1000+

Re: Feet on ground

MoreGamesNow wrote:

Jodymoses wrote:

Tried it ... Not effective... But cant you use trig in some way.. Thanx for trying

If you know the slope or angle of the incline

There is a way to detect the slope but its complicated and seems like a waste for whatever this is, since it sounds like you only need to detect one slope...


........................................................................................................................................................................................................................................

Offline

 

#8 2012-09-14 00:19:05

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

Re: Feet on ground

I Want It So That if i walk on eg. multiple slopes i scroll upward


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

Offline

 

Board footer