Collisions and Bullets

For questions about using Classic.

Post » Sun Dec 20, 2009 6:31 am

My ship sprites use the Bullet behavior. When the user left-clicks with the mouse, the ship turns toward the clicked position and increases it's speed. This works great, but unfortunately doesn't do collisions. From what I've read, the bullet behavior simply isn't designed for that.

So, what's the best solution to get my ships to realistically bounce off each other, and other objects in the game like asteroids? I've tried attaching another sprite to the ship, with the "8-direction" behavior. Unfortunately, I think that the bullet behavior in the ship essentially is setting the X & Y coordinates of the ship, overriding any collision behavior in the child objects.

Thoughts?
B
2
G
3
Posts: 20
Reputation: 890

Post » Sun Dec 20, 2009 6:39 am

If you want collisions like that then you should just use 8Direction directly on your ships and skip the Bullet behavior entirely.

Physics also has collisions, so that's another option. The Custom Movement object can also do collisions if you don't need something as powerful as physics. In fact, Custom Movement would probably be your best bet.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 20, 2009 11:36 pm

Is there any good documentation on custom movement? The Wiki page ([url:2l9cbp81]http://sourceforge.net/apps/mediawiki/construct/index.php?title=Custom_Movement[/url:2l9cbp81]) is incomplete.
B
2
G
3
Posts: 20
Reputation: 890


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests