Setting angle of motion

For questions about using Classic.

Post » Fri Feb 12, 2010 11:40 am

This is a nice, simple question so hopefully I can get a speedy answer. I'm making a rocketship (Car behaviour with no deceleration) in space that obviously drifts in space in a pretty laidback way, but the angle of motion is making thrusting in one direction then spinning around and thrusting the other way look weird. It basically does a little loop.

So my question is, is there a way to set the angle of motion to be whatever I want it to be? I'd like to have it be set the way the rocketship is facing.
B
2
G
4
Posts: 9
Reputation: 1,068

Post » Fri Feb 12, 2010 12:19 pm

It's always a good idea to post your .cap so that people can see what's going wrong. "It basically does a little loop" isn't all that descriptive :)

And I'm not entirely sure Car behavior is the best choice for spaceship type movement. I assume you're looking for something like Asteroids? You would probably get better results from Custom Movement, or Physics.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Fri Feb 12, 2010 1:56 pm

I was a little hesitant to post my .cap file since the game looks like ass right now, but okay!

http://www.mediafire.com/?mxznn0jnn20

Also, thankyou for your help, I will try one of those.
B
2
G
4
Posts: 9
Reputation: 1,068

Post » Fri Feb 12, 2010 7:35 pm

I did an asteroids-type movement and Custom Movement is perfect for it :wink:
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Feb 12, 2010 8:14 pm

[quote="Frocto":x1h0vuf3]I was a little hesitant to post my .cap file since the game looks like ass right now, but okay!

http://www.mediafire.com/?mxznn0jnn20

Also, thankyou for your help, I will try one of those.[/quote:x1h0vuf3]

Don't worry about how your game looks, nobody is going to mind ;)

Anyway, that "little loop" is coming from the fact that your hotspot is placed at the nose of your ship. When an object rotates it does so from the hotspot, which Construct assumes is the center of origin. If you want to rotate your ship in a natural looking way, you need to center your hotspot. So thank you for posting your .cap or else nobody would have ever caught that :)

I took off Car behavior gave your ship Custom Movement. I think it feels more natural and spacey, but you can decide for yourself. Your updated .cap is here:
http://dl.dropbox.com/u/529356/newship.cap
v0.99.82

I realize that you're using an older version of Construct but it may be worth it to you to upgrade because there were some other mistakes (one of them pretty major) that I noticed in your .cap that I corrected and added notes on.

Also, if you plan on making frequent uploads I recommend you get Dropbox, it's very handy. Mediafire is total crap.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat Feb 13, 2010 4:54 am

you are a true bro
B
2
G
4
Posts: 9
Reputation: 1,068

Post » Wed Mar 17, 2010 2:04 pm

When I tried to open this cap I got a popup that said out of memory? I have version 0.99.62. Is there a way I can load this? Thanks ;)
B
1
G
2
Posts: 1
Reputation: 627

Post » Wed Mar 17, 2010 2:41 pm

[quote="Ambrose":m0ceh21z]When I tried to open this cap I got a popup that said out of memory? I have version 0.99.62. Is there a way I can load this? Thanks ;)[/quote:m0ceh21z]

Get the most recent unstable version, should fix the problem.
B
3
S
2
G
3
Posts: 628
Reputation: 2,531

Post » Wed Mar 17, 2010 2:58 pm

Ambrose, he used v 99.84 you can get it here:
viewtopic.php?f=2&t=5938


Also I noticed that your ship, asteroid, and bullet have black around it to match the black background of space . The problem is that the extra black can also be hit during the collision. What you need to do is make the background for the sprite a transparent. If you use a paint program set the background for transparent and save it as a .png. If you use the construct paint program just do not color it.

If you do not understand I can recolor your graphics for you.

Oh and Welcome to Construct :D
B
28
S
8
G
8
Posts: 530
Reputation: 7,154


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests