Custom Space type movement problems

Get help using Construct 2

Post » Fri Jan 31, 2014 11:48 am

Hi,

I'm trying to create a space type movement using the bullet behavior (similar to SPAZ), I have pretty much got it apart from a sudden jump when moving from one direction to another.

Check out the following;
https://www.dropbox.com/s/7njufpi5j9hsq9s/custom.capx

Use the arrow keys to move, UP arrow always points towards the mouse, left and right strafe. Problem is It's not very smooth when you change directions, I have added the rotate 20 degrees in the up event which does help but, it will not work in any other direction. I have successfully added a lerp to the speed, still trying to get my head around how this works :)

Any help would be great.

Cheers,
DaveMiniHulk2014-01-31 12:01:16
Have retro games for sale? Buy & Sell Retro Games UK
B
9
S
2
Posts: 68
Reputation: 768

Post » Fri Jan 31, 2014 12:53 pm

I'm not exactly sure how you want your movement to be. I took a look in your capx and here are some remarks :
- instead of positioning your upper part over the lower every tick, use the Pin behavior.
- if I understand space type movement, you should do multiple bullets behavior. The first will be the "booster". The others will be the straffs. Pushing left and right would increase/decrease the power of the straffs, making it strife left and right. Pushing up would increase the speed.

Here is a capx doing this. The angle jump isn't here anymore.
capx

EDIT : i added more details in the code. To be clear, the problem you had was that rotating the lower part 90 when the left / right was pushed made the ship do a clean 90 angle in space, strange. Straff is here to help simulate that. I think the better way though would be to go with the physic behavior, and apply forces on acceleration/deceleration and side pushes.Guizmus2014-01-31 13:01:54
B
17
S
8
G
4
Posts: 461
Reputation: 6,157


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 14 guests