Advertisement

Making objects solid

Started by February 04, 2016 12:14 AM
2 comments, last by Ashaman73 8 years, 10 months ago

In AS3 i made some blocks that follow the player around. But the problem is, as the player moves around, the objects merge together and at one point you can't tell how many objects are on the screen. How do i make them solid so they cannot overlap each other. I am using 10 objects, they are all in an array and they are created and destroyed dynamically so i don't really know how i should try to fix this.

Look up collision detection and collision resolution.

edit - I don't know flash so I can't really help beyond that.

-potential energy is easily made kinetic-

Advertisement

Also "flock behavior" / "flock algorithm".

This is typically solved by steering behavior. There are different pattern of behavior, like flocking as mentioned by SotL, which will help you. Here is a good website about steering behavior: http://www.red3d.com/cwr/steer/

This topic is closed to new replies.

Advertisement