Customizing the Car Movement for Tidus97 :P

Post your own tutorials, guides and demos.

Post » Mon Nov 19, 2007 4:23 am

[quote="Tidus97":16gh1vop]im looking to replicate the car movements up arrow function. accelerating towards the direction the sprite is facing..which would be sprite.angle. but i dont know how to add that speed. i tried everything in the physics section and some in the other[/quote:16gh1vop]

EDIT:
Example removed. Problem solved.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 19, 2007 6:28 am

oh..bummer. i need alot of math? thats going to be a real hold back if i cant simply set a speed for my sprite and make it go in the direction its facing... o.o;

my sprite angle is equal to where the mouse is and it rotates at a set speed to view it, so all i really need is to apply a force or something to get it going in the direction its facing. -_________- this is tedious.


TYVM for writing all that up, though. i am sure it will benefit more then just me.
B
2
G
5
Posts: 22
Reputation: 1,294

Post » Mon Nov 19, 2007 9:56 am

[quote="Tidus97":1d8doo5g]thats going to be a real hold back if i cant simply set a speed for my sprite and make it go in the direction its facing... o.o;[/quote:1d8doo5g]

Wait... that's all you want to do?

Jeez, man, just use Bullet Movement. :roll:

Set angle, set speed... bam, you're done. Just be sure to set the default speed in the properties to 0.

I'm taking down the example I made so google doesn't shut down my googlepage...
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 19, 2007 12:56 pm

Could you repost the math? It could be useful for something to me.
B
2
S
2
G
5
Posts: 512
Reputation: 2,674

Post » Mon Nov 19, 2007 7:29 pm

I didn't post an example of manually calculating speed and trajectory. I don't know how to do that. What I posted was a way to "hack" the Car movement, because Tidus97 said something about wanting the accelerate function and nothing else.

Plus, I deleted that .cap.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Nov 19, 2007 7:41 pm

Tidus, is it a car movement that can rotate when you're stopped that you want?
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468


Return to Your tutorials & example files

Who is online

Users browsing this forum: No registered users and 1 guest