Attraction and Repulsion


Discuss game development algorithms and physics theories behind it.

Moderator: BenTheMan

Attraction and Repulsion

Postby PHY » July 10th, 2006, 5:46 pm

This simple simulation shows how to create two object follow the 3rd one (in this case, mouse pointer)

2 balls that repel each other that are attracted to the mouse. Also some really simple collision detection.


This simulation shows how you can simulate cloth movement. Use mouse to drag from corners.

[japplet_start code="boucyballs" width=400 height=400 codebase="/forums/misc/java/" archive="boucyballs.jar"][/japplet_start]
[japplet_param name="boxmessage" value="Loading, Please wait . . ."][/japplet_param]
[japplet_param name="boxbgcolor" value="#FFFFFF"][/japplet_param]
To view this content, you need to install Java from <A HREF="http://java.com">java.com</A>
[japplet_stop][/japplet_stop]

Author : james corbett.
This Java Applet built with processing and traer.physics
PHY
 
Posts: 223
Joined: June 22nd, 2006, 4:03 pm

Return to Game Development

Who is online

Users browsing this forum: No registered users