The Daily Click ::. Forums ::. Klik Coding Help ::. simple movement idea help
 

Post Reply  Post Oekaki 
 

Posted By Message

HarrysGames10



Registered
  11/01/2012
Points
  7
11th January, 2012 at 19:43:13 -

i want to make a ball rolling movement so when it hits an object it rolls across it and when it gets to the edge it falls off that object. i also want to make this work for slanted objects as well.
could anyone possibly help me out with this. it would be appreciated.
thanks

 
n/a

Del Duio

Born in a Bowling Alley

Registered
  29/07/2005
Points
  1078

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!GOTW WINNER CUP 4!Evil klikerHasslevania 2!The OutlawSanta Boot
11th January, 2012 at 19:48:28 -


Originally Posted by Harrison Waid
i want to make a ball rolling movement so when it hits an object it rolls across it and when it gets to the edge it falls off that object. i also want to make this work for slanted objects as well.
could anyone possibly help me out with this. it would be appreciated.
thanks



Very basic idea but you could have

Always
+Ball overlapping an object [NEGATED]
-> Ball Y position = Ball Y position + 1

That doesn't take into account for the ball rolling across the object though, you'd have to factor that in for whenever the ball is overlapping the object(s) that break its fall.

 
--

"Del Duio has received 0 trophies. Click here to see them all."

"To be a true ninja you must first pick the most stealthy of our assorted combat suits. Might I suggest the bright neon orange?"

DXF Games, coming next: Hasslevania 2- This Space for Rent!

HarrysGames10



Registered
  11/01/2012
Points
  7
11th January, 2012 at 19:51:36 -

yeah thats the easy part. and same with when it hits a flat object. but how could i make it follow the line of an object at an angle?

 
n/a

s-m-r

Slow-Motion Riot

Registered
  04/06/2006
Points
  1078

Candle
11th January, 2012 at 20:21:02 -

Maybe try a pinball movement, and let the player's input modify the speed and direction of the object? Pressing the direction button increases the speed more than just tapping it; pressing the spacebar changes the direction to upward and amps up the speed; etc.

I'm not sure if you're doing a platform game, isometric, or whatever. But what I'm thinking of is straight outta Marble Madness:

http://vimm.net/vault/?p=details&id=534

Edited by s-m-r

 
n/a
   

Post Reply



 



Advertisement

Worth A Click