Addition of "e.vel"

Suggest changes and improvements to Algodoo.

Addition of "e.vel"

Postby Rideg » Mon Oct 04, 2010 8:47 pm

What I'm suggesting is a way to get the velocity of an object without the maths. e.pos already exist and I couldn't go on without using it. but a e.vel? Picture this: You've built a great engine and when you use it on a car it works perfectly. Until it gets to a high velocity and you get circles all over the place. It takes all prestige from your work and scatters it like circles over a field. Instead you have your spawn engine and in the circle script you type: vel := 20 * e.normal + e.vel;
that would prevent it from failing at higher speeds.

What do you think. Am I being childish belivieving this could work or can it be done?

Thank you for reading.
-Johan
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden

Re: Addition of "e.vel"

Postby Nait » Wed Oct 06, 2010 6:31 am

Supprot.

But I think it should be e.this.vel or e.other.vel (without so called "New method"(also e.this.pos would be good...))

PS I think it can be done, because if we can calculate vel, what prevents to make a regular property...
User avatar
Nait
 
Posts: 224
Joined: Fri Oct 30, 2009 1:56 am
Location: Eastern Russia, Vladivostok

Re: Addition of "e.vel"

Postby Mystery » Wed Oct 06, 2010 7:00 am

Velocity is calculated by comparing position (e.pos) with the position of the last step.
Kind of like saying 10 seconds ago i was 100 meters away therefor i am moving at 10m/s.

Although in Algodoo the vel and the actual speed is different.
Speed can be calculated like so.
[x, y] = Vel
(x^2 + y^2)^0.5 = Speed
User avatar
Mystery
 
Posts: 2802
Joined: Thu Sep 03, 2009 1:16 pm
Location: Southern Australia

Re: Addition of "e.vel"

Postby Rideg » Wed Oct 06, 2010 9:02 pm

I know how it's calculated.
The e.this.* is for objects variables that can be changed without new method. A e.vel would access the velocity directly from the object.

I'm referring to velocity not speed. :thumbup:
Image
make sure to check out my work.
User avatar
Rideg
 
Posts: 948
Joined: Tue Dec 15, 2009 5:17 pm
Location: Östersund, Sweden


Return to Suggestions

Who is online

Users browsing this forum: No registered users and 4 guests