Physics-based car driving

Get help using Construct 2

Post » Tue Jan 27, 2015 11:55 pm

Rhindon wrote:I've spent the last two years slooooooooowly learning how to do that AND how to program with C2, itself. Anyway, long story short, I appreciate the feedback and the suggestions. I need it so I can try things out and figure out what works for my ultimate goals.


This is exactly the same boat that I find myself in. I've had a bunch of false starts and only recently found satisfaction with my sketch book project. I enjoy the maths and technical side of working with the c2 editor but it takes so much more to stick with it until everything is done to a good standard.

More than happy to help! :)
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Fri Jan 30, 2015 12:23 am

@Colludium - Alrighty...looking over your revision, in the first Function, "speed and velocity calc", you take the square root of the the sum of the X and Y velocity values each squared.
Why the square root? What is the meaning of the maths here? :P LOL
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
135
S
22
G
8
Posts: 770
Reputation: 14,689

Post » Fri Jan 30, 2015 12:24 am

Also, what is an "arccosine". Even in my brief time in Trig/Calc in high school, I do not recall ever learning about this.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
135
S
22
G
8
Posts: 770
Reputation: 14,689

Post » Fri Jan 30, 2015 1:38 am

@Rhindon, maths, trigonometry and engineering physics are my forte - but not when I'm tired LOL - which is why I love C2 because I'm also, it seems, unable to learn how to code effectively (and I've tried - I just don't have the patience / aptitude!).

Rhindon wrote:Why the square root? What is the meaning of the maths here? :P LOL


All I was doing was applying Pythagoras' Theorem to the data from the physics behavior. It's a fancy way of saying that I took the velocityX and velocityY values from the physics behavior and added them together to determine the overall velocity of the object. They can't just be added together, though, they need to be squared before they are added - by taking the square root of that sum it allowed me to work with a pixels per second value, which is easier on my brain, although not strictly necessary. This explanation does a better job than I can to explain how it works, if you're interested!

Rhindon wrote:Also, what is an "arccosine". Even in my brief time in Trig/Calc in high school, I do not recall ever learning about this.


The arccosine of an angle is simply the inverse of the cosine of an angle. LOL - I must have been tired when I put that example together - luckily I stopped trying to calculate whatever it is I was thinking of by using that equation. It simply won't work - if the velocityY is zero it will return NaN.... Oh well... I'll go and edit it out of the original - the shame!!

The correct equation would have been: velocity angle = arccos( velocityX / sqrt(velocityX^2 + velocityY^2) )
Last edited by Colludium on Sat Jan 31, 2015 8:58 am, edited 1 time in total.
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Post » Sat Jan 31, 2015 5:58 am

@Colludium - Thank you for the explanation. I will surely need to study up, but I think I follow at least a little. :) I may call on you later for further assist.
I'm seeking Narnia. Who wants to come with me! Aslan is on the move!
B
135
S
22
G
8
Posts: 770
Reputation: 14,689

Post » Sat Jan 31, 2015 9:02 am

Happy to :).
I only occasionally visit - I'm learning C# for Unity, but c2 is still a respectable game engine imo....
B
73
S
19
G
66
Posts: 2,198
Reputation: 42,188

Previous

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 13 guests

cron