Spawning With Same Velocity

About advanced scenes, and the Thyme scripting language used in Algodoo.

Spawning With Same Velocity

Postby FruitMonger » Thu Apr 07, 2011 2:49 am

Okay I know there's already a topic about something like this, but I'm not sure it's about the same exact thing.
What I want to do is spawn something at the same exact velocity as the spawner. I've tried looking in the forums with the search function, and tried looking in the algobox, but I can't find anything that tells me exactly how.
Think somebody could help me out?
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: Spawning With Same Velocity

Postby TC42 » Thu Apr 07, 2011 3:17 am

Use Kilinich's K-probe (Laser Edition) and set the velocity of a spawned object to vel:=K1velocity or what ever his variable was.
Image
Spambot wrote:Nowadays, memes usually are studied less in the field of biology, but more with the arena of psychology along with sociology. But, the major area of a meme, getting embraced and imitated all the time is what’s at any core connected with any meme.
User avatar
TC42
 
Posts: 984
Joined: Sun Jan 09, 2011 1:53 pm
Location: $ sudo apt get-install sandwich_

Re: Spawning With Same Velocity

Postby FruitMonger » Thu Apr 07, 2011 4:55 am

Thanks allot, worked perfectly :D .
Image
User avatar
FruitMonger
 
Posts: 135
Joined: Thu Dec 10, 2009 8:20 pm
Location: Some fruit stand in Indiana

Re: Spawning With Same Velocity

Postby Someone Else » Fri Apr 08, 2011 1:30 am

Code: Select all
textureMatrix=[e.pos(0)-textureMatrix(2),e.pos(1)-textureMatrix(3),e.pos(0),e.pos(1)(textureMatrix(0)^2+textureMatrix(1)^2)^0.5,0,0,0];

Credit to davidz40 for this code.
You'll want to set vel := [textureMatrix(0), textureMatrix(1)].
textureMatrix(4) is the magnitude of the velocity vector.
Matthias Wandel is epic, in my humble opinion.
I love my brain...
TC42 wrote:Also, your sig is too big, please change it.

ARE YA HAPPY NOW?????

Thymechanic/Phundamentalist

Recently, I discovered something a lot of you probably already knew: Minecraft is awesome.
Due to this, I may not be as active as usual for a while.
User avatar
Someone Else
 
Posts: 1147
Joined: Sun Nov 21, 2010 10:53 pm
Location: The Milky Way Galaxy


Return to Thyme scripting

Who is online

Users browsing this forum: No registered users and 6 guests